|
|
| version 1.8, 2005/02/09 20:11:36 | version 1.10, 2007/01/08 07:52:01 |
|---|---|
| Line 5 | Line 5 |
| #include "np2class.h" | #include "np2class.h" |
| const OEMCHAR np2dlgclass[] = OEMTEXT("np2dialog"); | const TCHAR np2dlgclass[] = _T("np2dialog"); |
| void np2class_initialize(HINSTANCE hinst) { | void np2class_initialize(HINSTANCE hinst) { |
| Line 71 int CALLBACK np2class_propetysheet(HWND | Line 71 int CALLBACK np2class_propetysheet(HWND |
| void np2class_wmcreate(HWND hWnd) { | void np2class_wmcreate(HWND hWnd) { |
| SetWindowLong(hWnd, NP2GWL_HMENU, 0); | SetWindowLongPtr(hWnd, NP2GWLP_HMENU, 0); |
| } | } |
| void np2class_wmdestroy(HWND hWnd) { | void np2class_wmdestroy(HWND hWnd) { |
| HMENU hmenu; | HMENU hmenu; |
| hmenu = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU); | hmenu = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU); |
| if (hmenu != NULL) { | if (hmenu != NULL) { |
| DestroyMenu(hmenu); | DestroyMenu(hmenu); |
| SetWindowLong(hWnd, NP2GWL_HMENU, 0); | SetWindowLongPtr(hWnd, NP2GWLP_HMENU, 0); |
| } | } |
| } | } |
| Line 90 void np2class_enablemenu(HWND hWnd, BOOL | Line 90 void np2class_enablemenu(HWND hWnd, BOOL |
| HMENU hmenu; | HMENU hmenu; |
| BOOL draw; | BOOL draw; |
| hmenu = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU); | hmenu = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU); |
| draw = FALSE; | draw = FALSE; |
| if (enable) { | if (enable) { |
| if (hmenu) { | if (hmenu) { |
| Line 108 void np2class_enablemenu(HWND hWnd, BOOL | Line 108 void np2class_enablemenu(HWND hWnd, BOOL |
| } | } |
| } | } |
| } | } |
| SetWindowLong(hWnd, NP2GWL_HMENU, (LONG)hmenu); | SetWindowLongPtr(hWnd, NP2GWLP_HMENU, (LONG_PTR)hmenu); |
| if (draw) { | if (draw) { |
| DrawMenuBar(hWnd); | DrawMenuBar(hWnd); |
| } | } |
| Line 173 HMENU np2class_gethmenu(HWND hWnd) { | Line 173 HMENU np2class_gethmenu(HWND hWnd) { |
| HMENU ret; | HMENU ret; |
| ret = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU); | ret = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU); |
| if (ret == NULL) { | if (ret == NULL) { |
| ret = GetMenu(hWnd); | ret = GetMenu(hWnd); |
| } | } |