--- np2/win9xc/np2.cpp 2005/05/13 05:47:25 1.33 +++ np2/win9xc/np2.cpp 2011/02/15 00:51:52 1.34 @@ -653,15 +653,20 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT case WM_PAINT: hdc = BeginPaint(hWnd, &ps); if (np2opening) { - HINSTANCE hinst; + HINSTANCE hinst; RECT rect; int width; int height; - HBITMAP hbmp; - BITMAP bmp; - HDC hmdc; + HBITMAP hbmp; + BITMAP bmp; + HDC hmdc; HBRUSH hbrush; - hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); + +#if defined(_WIN64) + hinst = reinterpret_cast(::GetWindowLongPtr(hWnd, GWLP_HINSTANCE)); +#else + hinst = reinterpret_cast(::GetWindowLong(hWnd, GWL_HINSTANCE)); +#endif GetClientRect(hWnd, &rect); width = rect.right - rect.left; height = rect.bottom - rect.top; @@ -1133,6 +1138,6 @@ int WINAPI WinMain(HINSTANCE hInstance, _MEM_USED("report.txt"); dosio_term(); - return(msg.wParam); + return static_cast(msg.wParam); }