| version 1.1.1.1, 2003/10/16 17:59:00 | version 1.7, 2004/04/08 13:08:23 | 
| Line 1 | Line 1 | 
 | #include        "compiler.h" | #include        "compiler.h" | 
 | #include        <commctrl.h> | #include        <commctrl.h> | 
 | #include        <prsht.h> | #include        <prsht.h> | 
 | #include        "resource.h" |  | 
 | #include        "strres.h" | #include        "strres.h" | 
 |  | #include        "resource.h" | 
 | #include        "np2.h" | #include        "np2.h" | 
 | #include        "scrnmng.h" | #include        "scrnmng.h" | 
 | #include        "sysmng.h" | #include        "sysmng.h" | 
 |  | #include        "np2class.h" | 
 |  | #include        "dialog.h" | 
 |  | #include        "dialogs.h" | 
 | #include        "pccore.h" | #include        "pccore.h" | 
 | #include        "iocore.h" | #include        "iocore.h" | 
 | #include        "scrndraw.h" | #include        "scrndraw.h" | 
 | #include        "palettes.h" | #include        "palettes.h" | 
 | #include        "dialog.h" |  | 
 | #include        "dialogs.h" |  | 
 |  |  | 
 |  |  | 
 | static const char str_scropt[] = "Screen option"; | static const char str_scropt[] = "Screen option"; | 
| Line 60  static LRESULT CALLBACK Scropt1DlgProc(H | Line 61  static LRESULT CALLBACK Scropt1DlgProc(H | 
 | break; | break; | 
 |  |  | 
 | case WM_NOTIFY: | case WM_NOTIFY: | 
| if ((((NMHDR *)lp)->code) == PSN_APPLY) { | if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { | 
 | renewal = 0; | renewal = 0; | 
 | b = GetDlgItemCheck(hWnd, IDC_SKIPLINE); | b = GetDlgItemCheck(hWnd, IDC_SKIPLINE); | 
 | if (np2cfg.skipline != b) { | if (np2cfg.skipline != b) { | 
| Line 86  static LRESULT CALLBACK Scropt1DlgProc(H | Line 87  static LRESULT CALLBACK Scropt1DlgProc(H | 
 | renewal = 1; | renewal = 1; | 
 | } | } | 
 | if (renewal) { | if (renewal) { | 
 | sysmng_update(SYS_UPDATECFG); |  | 
 | scrndraw_redraw(); | scrndraw_redraw(); | 
 |  | sysmng_update(SYS_UPDATECFG); | 
 | } | } | 
 | return(TRUE); | return(TRUE); | 
 | } | } | 
| Line 114  static LRESULT CALLBACK Scropt2DlgProc(H | Line 115  static LRESULT CALLBACK Scropt2DlgProc(H | 
 | } | } | 
 | SetDlgItemCheck(hWnd, gdcchip[np2cfg.grcg & 3], TRUE); | SetDlgItemCheck(hWnd, gdcchip[np2cfg.grcg & 3], TRUE); | 
 | SetDlgItemCheck(hWnd, IDC_PC980124, np2cfg.color16); | SetDlgItemCheck(hWnd, IDC_PC980124, np2cfg.color16); | 
 |  | #if defined(SUPPORT_PC9821) | 
 |  | EnableWindow(GetDlgItem(hWnd, IDC_GCBOX), FALSE); | 
 |  | EnableWindow(GetDlgItem(hWnd, IDC_GRCGNON), FALSE); | 
 |  | EnableWindow(GetDlgItem(hWnd, IDC_GRCG), FALSE); | 
 |  | EnableWindow(GetDlgItem(hWnd, IDC_GRCG2), FALSE); | 
 |  | EnableWindow(GetDlgItem(hWnd, IDC_EGC), FALSE); | 
 |  | EnableWindow(GetDlgItem(hWnd, IDC_PC980124), FALSE); | 
 |  | #endif | 
 | return(TRUE); | return(TRUE); | 
 |  |  | 
 | case WM_NOTIFY: | case WM_NOTIFY: | 
| if ((((NMHDR *)lp)->code) == PSN_APPLY) { | if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { | 
 | update = 0; | update = 0; | 
 | b = GetDlgItemCheck(hWnd, IDC_GDC72020); | b = GetDlgItemCheck(hWnd, IDC_GDC72020); | 
 | if (np2cfg.uPD72020 != b) { | if (np2cfg.uPD72020 != b) { | 
| Line 212  static LRESULT CALLBACK Scropt3DlgProc(H | Line 221  static LRESULT CALLBACK Scropt3DlgProc(H | 
 | break; | break; | 
 |  |  | 
 | case WM_NOTIFY: | case WM_NOTIFY: | 
| if ((((NMHDR *)lp)->code) == PSN_APPLY) { | if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { | 
 | update = 0; | update = 0; | 
 | ZeroMemory(value, sizeof(value)); | ZeroMemory(value, sizeof(value)); | 
 | value[0] = (BYTE)SendDlgItemMessage(hWnd, IDC_TRAMWAIT, | value[0] = (BYTE)SendDlgItemMessage(hWnd, IDC_TRAMWAIT, | 
| Line 278  void dialog_scropt(HWND hWnd) { | Line 287  void dialog_scropt(HWND hWnd) { | 
 |  |  | 
 | ZeroMemory(&psh, sizeof(psh)); | ZeroMemory(&psh, sizeof(psh)); | 
 | psh.dwSize = sizeof(PROPSHEETHEADER); | psh.dwSize = sizeof(PROPSHEETHEADER); | 
| psh.dwFlags = PSH_NOAPPLYNOW; | psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEHICON | PSH_USECALLBACK; | 
 | psh.hwndParent = hWnd; | psh.hwndParent = hWnd; | 
 | psh.hInstance = hinst; | psh.hInstance = hinst; | 
 |  | psh.hIcon = LoadIcon(hinst, MAKEINTRESOURCE(IDI_ICON2)); | 
 | psh.nPages = 3; | psh.nPages = 3; | 
 | psh.phpage = hpsp; | psh.phpage = hpsp; | 
 | psh.pszCaption = str_scropt; | psh.pszCaption = str_scropt; | 
 |  | psh.pfnCallback = np2class_propetysheet; | 
 | PropertySheet(&psh); | PropertySheet(&psh); | 
 | InvalidateRect(hWndMain, NULL, TRUE); | InvalidateRect(hWndMain, NULL, TRUE); | 
 | } | } |