Diff for /np2/win9x/dialog/np2class.cpp between versions 1.5 and 1.10

version 1.5, 2004/01/22 01:10:05 version 1.10, 2007/01/08 07:52:01
Line 5 Line 5
 #include        "np2class.h"  #include        "np2class.h"
   
   
 const char np2dlgclass[] = "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);
         }          }
 }  }
   
 void np2class_windowtype(HWND hWnd, BYTE type) {  void np2class_windowtype(HWND hWnd, UINT8 type) {
   
         RECT            rect;          RECT    rect;
         DWORD           style;          DWORD   style;
   
         GetClientRect(hWnd, &rect);          GetClientRect(hWnd, &rect);
         style = GetWindowLong(hWnd, GWL_STYLE);          style = GetWindowLong(hWnd, GWL_STYLE);
Line 146  void np2class_windowtype(HWND hWnd, BYTE Line 146  void np2class_windowtype(HWND hWnd, BYTE
                                                         rect.right - rect.left, rect.bottom - rect.top);                                                          rect.right - rect.left, rect.bottom - rect.top);
 }  }
   
   void np2class_frametype(HWND hWnd, UINT8 thick) {
   
           RECT    rect;
           DWORD   style;
   
           GetClientRect(hWnd, &rect);
           style = GetWindowLong(hWnd, GWL_STYLE);
           if (thick) {
                   style |= WS_THICKFRAME;
           }
           else {
                   style &= ~WS_THICKFRAME;
           }
           SetWindowLong(hWnd, GWL_STYLE, style);
           SetWindowPos(hWnd, 0, 0, 0, 0, 0,
                                           SWP_FRAMECHANGED | SWP_DRAWFRAME | 
                                           SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
           winloc_setclientsize(hWnd,
                                                           rect.right - rect.left, rect.bottom - rect.top);
   }
   
   
   
 HMENU np2class_gethmenu(HWND hWnd) {  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);
         }          }

Removed from v.1.5  
changed lines
  Added in v.1.10


RetroPC.NET-CVS <cvs@retropc.net>