--- np2/win9xc/dialog/d_screen.cpp 2005/03/20 08:58:20 1.5 +++ np2/win9xc/dialog/d_screen.cpp 2011/02/15 00:51:51 1.6 @@ -258,7 +258,11 @@ void dialog_scropt(HWND hWnd) { PROPSHEETHEADER psh; HPROPSHEETPAGE hpsp[3]; - 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 ZeroMemory(&psp, sizeof(psp)); psp.dwSize = sizeof(PROPSHEETPAGE);