--- np2/win9x/dialog/np2class.cpp 2004/05/23 15:01:45 1.6 +++ np2/win9x/dialog/np2class.cpp 2007/01/08 07:52:01 1.10 @@ -5,7 +5,7 @@ #include "np2class.h" -const char np2dlgclass[] = "np2dialog"; +const TCHAR np2dlgclass[] = _T("np2dialog"); void np2class_initialize(HINSTANCE hinst) { @@ -71,17 +71,17 @@ int CALLBACK np2class_propetysheet(HWND void np2class_wmcreate(HWND hWnd) { - SetWindowLong(hWnd, NP2GWL_HMENU, 0); + SetWindowLongPtr(hWnd, NP2GWLP_HMENU, 0); } void np2class_wmdestroy(HWND hWnd) { HMENU hmenu; - hmenu = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU); + hmenu = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU); if (hmenu != NULL) { DestroyMenu(hmenu); - SetWindowLong(hWnd, NP2GWL_HMENU, 0); + SetWindowLongPtr(hWnd, NP2GWLP_HMENU, 0); } } @@ -90,7 +90,7 @@ void np2class_enablemenu(HWND hWnd, BOOL HMENU hmenu; BOOL draw; - hmenu = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU); + hmenu = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU); draw = FALSE; if (enable) { if (hmenu) { @@ -108,13 +108,13 @@ void np2class_enablemenu(HWND hWnd, BOOL } } } - SetWindowLong(hWnd, NP2GWL_HMENU, (LONG)hmenu); + SetWindowLongPtr(hWnd, NP2GWLP_HMENU, (LONG_PTR)hmenu); if (draw) { DrawMenuBar(hWnd); } } -void np2class_windowtype(HWND hWnd, BYTE type) { +void np2class_windowtype(HWND hWnd, UINT8 type) { RECT rect; DWORD style; @@ -146,7 +146,7 @@ void np2class_windowtype(HWND hWnd, BYTE rect.right - rect.left, rect.bottom - rect.top); } -void np2class_frametype(HWND hWnd, BYTE thick) { +void np2class_frametype(HWND hWnd, UINT8 thick) { RECT rect; DWORD style; @@ -173,7 +173,7 @@ HMENU np2class_gethmenu(HWND hWnd) { HMENU ret; - ret = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU); + ret = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU); if (ret == NULL) { ret = GetMenu(hWnd); }