Diff for /np2/win9x/np2.cpp between versions 1.69 and 1.73

version 1.69, 2007/01/08 01:16:59 version 1.73, 2007/07/20 15:02:29
Line 360  static void np2popup(HWND hWnd, LPARAM l Line 360  static void np2popup(HWND hWnd, LPARAM l
         HMENU   hMenu;          HMENU   hMenu;
         POINT   pt;          POINT   pt;
   
         mainmenu = (HMENU)GetWindowLong(hWnd, NP2GWL_HMENU);          mainmenu = (HMENU)GetWindowLongPtr(hWnd, NP2GWLP_HMENU);
         if (mainmenu == NULL) {          if (mainmenu == NULL) {
                 return;                  return;
         }          }
Line 375  static void np2popup(HWND hWnd, LPARAM l Line 375  static void np2popup(HWND hWnd, LPARAM l
   
 static void np2cmd(HWND hWnd, UINT16 cmd) {  static void np2cmd(HWND hWnd, UINT16 cmd) {
   
         HINSTANCE       hInst;          HINSTANCE       hinst;
         UINT            update;          UINT            update;
         BOOL            b;          BOOL            b;
   
         hInst = GetWindowInst(hWnd);          hinst = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE);
         update = 0;          update = 0;
         switch(cmd) {          switch(cmd) {
                 case IDM_RESET:                  case IDM_RESET:
Line 406  static void np2cmd(HWND hWnd, UINT16 cmd Line 406  static void np2cmd(HWND hWnd, UINT16 cmd
                 case IDM_CONFIG:                  case IDM_CONFIG:
                         winuienter();                          winuienter();
                         sstpmsg_config();                          sstpmsg_config();
                         DialogBox(hInst, MAKEINTRESOURCE(IDD_CONFIG),                          DialogBox(hinst, MAKEINTRESOURCE(IDD_CONFIG),
                                                                         hWnd, (DLGPROC)CfgDialogProc);                                                                          hWnd, (DLGPROC)CfgDialogProc);
                         if (!scrnmng_isfullscreen()) {                          if (!scrnmng_isfullscreen()) {
                                 UINT8 thick;                                  UINT8 thick;
Line 793  static void np2cmd(HWND hWnd, UINT16 cmd Line 793  static void np2cmd(HWND hWnd, UINT16 cmd
                         update |= SYS_UPDATECFG;                          update |= SYS_UPDATECFG;
                         break;                          break;
   
   #if defined(SUPPORT_PX)
                   case IDM_PX1:
                           xmenu_setsound(0x30);
                           update |= SYS_UPDATECFG;
                           break;
   
                   case IDM_PX2:
                           xmenu_setsound(0x50);
                           update |= SYS_UPDATECFG;
                           break;
   #endif  // defined(SUPPORT_PX)
   
                 case IDM_JASTSOUND:                  case IDM_JASTSOUND:
                         xmenu_setjastsound(np2oscfg.jastsnd ^ 1);                          xmenu_setjastsound(np2oscfg.jastsnd ^ 1);
                         update |= SYS_UPDATEOSCFG;                          update |= SYS_UPDATEOSCFG;
Line 847  static void np2cmd(HWND hWnd, UINT16 cmd Line 859  static void np2cmd(HWND hWnd, UINT16 cmd
   
                 case IDM_MPUPC98:                  case IDM_MPUPC98:
                         winuienter();                          winuienter();
                         DialogBox(hInst, MAKEINTRESOURCE(IDD_MPUPC98),                          DialogBox(hinst, MAKEINTRESOURCE(IDD_MPUPC98),
                                                                                         hWnd, (DLGPROC)MidiDialogProc);                                                                                          hWnd, (DLGPROC)MidiDialogProc);
                         winuileave();                          winuileave();
                         break;                          break;
Line 895  static void np2cmd(HWND hWnd, UINT16 cmd Line 907  static void np2cmd(HWND hWnd, UINT16 cmd
   
                 case IDM_CALENDAR:                  case IDM_CALENDAR:
                         winuienter();                          winuienter();
                         DialogBox(hInst, MAKEINTRESOURCE(IDD_CALENDAR),                          DialogBox(hinst, MAKEINTRESOURCE(IDD_CALENDAR),
                                                                                         hWnd, (DLGPROC)ClndDialogProc);                                                                                          hWnd, (DLGPROC)ClndDialogProc);
                         winuileave();                          winuileave();
                         break;                          break;
Line 943  static void np2cmd(HWND hWnd, UINT16 cmd Line 955  static void np2cmd(HWND hWnd, UINT16 cmd
                         sstpmsg_about();                          sstpmsg_about();
                         if (sstp_result() != SSTP_SENDING) {                          if (sstp_result() != SSTP_SENDING) {
                                 winuienter();                                  winuienter();
                                 DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUT),                                  DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUT),
                                                                 hWnd, (DLGPROC)AboutDialogProc);                                                                  hWnd, (DLGPROC)AboutDialogProc);
                                 winuileave();                                  winuileave();
                         }                          }
Line 1066  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1078  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                 case IDM_SCRNMUL16:                                  case IDM_SCRNMUL16:
                                         if ((!scrnmng_isfullscreen()) &&                                          if ((!scrnmng_isfullscreen()) &&
                                                 !(GetWindowLong(hWndMain, GWL_STYLE) & WS_MINIMIZE)) {                                                  !(GetWindowLong(hWndMain, GWL_STYLE) & WS_MINIMIZE)) {
                                                 sysmenu_setscrnmul(wParam - IDM_SCRNMUL);                                                  sysmenu_setscrnmul((UINT8)(wParam - IDM_SCRNMUL));
                                                 scrnmng_setmultiple(wParam - IDM_SCRNMUL);                                                  scrnmng_setmultiple((int)(wParam - IDM_SCRNMUL));
                                         }                                          }
                                         break;                                          break;
   
Line 1131  LRESULT CALLBACK WndProc(HWND hWnd, UINT Line 1143  LRESULT CALLBACK WndProc(HWND hWnd, UINT
                                 BITMAP          bmp;                                  BITMAP          bmp;
                                 HDC                     hmdc;                                  HDC                     hmdc;
                                 HBRUSH          hbrush;                                  HBRUSH          hbrush;
                                 hinst = GetWindowInst(hWnd);                                  hinst = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE);
                                 GetClientRect(hWnd, &rect);                                  GetClientRect(hWnd, &rect);
                                 width = rect.right - rect.left;                                  width = rect.right - rect.left;
                                 height = rect.bottom - rect.top;                                  height = rect.bottom - rect.top;
Line 1521  int WINAPI WinMain(HINSTANCE hInstance,  Line 1533  int WINAPI WinMain(HINSTANCE hInstance, 
                 wc.style = CS_BYTEALIGNCLIENT | CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;                  wc.style = CS_BYTEALIGNCLIENT | CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
                 wc.lpfnWndProc = WndProc;                  wc.lpfnWndProc = WndProc;
                 wc.cbClsExtra = 0;                  wc.cbClsExtra = 0;
                 wc.cbWndExtra = NP2GWL_SIZE;                  wc.cbWndExtra = NP2GWLP_SIZE;
                 wc.hInstance = hInst;                  wc.hInstance = hInst;
                 wc.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));                  wc.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
                 wc.hCursor = LoadCursor(NULL, IDC_ARROW);                  wc.hCursor = LoadCursor(NULL, IDC_ARROW);
Line 1837  int WINAPI WinMain(HINSTANCE hInstance,  Line 1849  int WINAPI WinMain(HINSTANCE hInstance, 
   
         viewer_term();                                                                                                  // ver0.30          viewer_term();                                                                                                  // ver0.30
   
         return(msg.wParam);          return((int)msg.wParam);
 }  }
   

Removed from v.1.69  
changed lines
  Added in v.1.73


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