| version 1.1, 2003/10/16 17:59:01 | version 1.8, 2003/11/03 00:49:55 | 
| Line 1 | Line 1 | 
 | #include        "compiler.h" | #include        "compiler.h" | 
| #include        "resource.h" | #include        <prsht.h> | 
 | #include        "strres.h" | #include        "strres.h" | 
 |  | #include        "resource.h" | 
 | #include        "np2.h" | #include        "np2.h" | 
 | #include        "dosio.h" | #include        "dosio.h" | 
 | #include        "commng.h" | #include        "commng.h" | 
 | #include        "sysmng.h" | #include        "sysmng.h" | 
 |  | #include        "np2class.h" | 
 |  | #include        "dialog.h" | 
 |  | #include        "dialogs.h" | 
 |  | #include        "bit2res.h" | 
 | #include        "pccore.h" | #include        "pccore.h" | 
 | #include        "iocore.h" | #include        "iocore.h" | 
 | #include        "pc9861k.h" | #include        "pc9861k.h" | 
 | #include        "bit2res.h" |  | 
 | #include        "dialog.h" |  | 
 | #include        "dialogs.h" |  | 
 |  |  | 
 |  |  | 
 | static const char str_none[] = "NONE"; | static const char str_none[] = "NONE"; | 
| Line 152  static LRESULT CALLBACK dlgitem_proc(HWN | Line 154  static LRESULT CALLBACK dlgitem_proc(HWN | 
 | } str; | } str; | 
 | COMCFG  *cfg; | COMCFG  *cfg; | 
 | UINT    update; | UINT    update; | 
 |  | COMMNG  cm; | 
 |  |  | 
 | switch (msg) { | switch (msg) { | 
 | case WM_INITDIALOG: | case WM_INITDIALOG: | 
| Line 218  static LRESULT CALLBACK dlgitem_proc(HWN | Line 221  static LRESULT CALLBACK dlgitem_proc(HWN | 
 | break; | break; | 
 |  |  | 
 | case WM_NOTIFY: | case WM_NOTIFY: | 
| if ((((NMHDR *)lp)->code) == PSN_APPLY) { | if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { | 
 | cfg = m->cfg; | cfg = m->cfg; | 
 | update = 0; | update = 0; | 
 | r = SendDlgItemMessage(hWnd, m->idc[ID_PORT], | r = SendDlgItemMessage(hWnd, m->idc[ID_PORT], | 
| Line 287  static LRESULT CALLBACK dlgitem_proc(HWN | Line 290  static LRESULT CALLBACK dlgitem_proc(HWN | 
 | } | } | 
 |  |  | 
 | cfg->def_en = GetDlgItemCheck(hWnd, m->idc[ID_DEFE]); | cfg->def_en = GetDlgItemCheck(hWnd, m->idc[ID_DEFE]); | 
 |  | cm = *m->cm; | 
 |  | if (cm) { | 
 |  | cm->msg(cm, COMMSG_MIMPIDEFEN, cfg->def_en); | 
 |  | } | 
 | GetDlgItemText(hWnd, m->idc[ID_DEFF], | GetDlgItemText(hWnd, m->idc[ID_DEFF], | 
 | str.mdef, sizeof(str.mdef)); | str.mdef, sizeof(str.mdef)); | 
 | if (milstr_cmp(cfg->def, str.mdef)) { | if (milstr_cmp(cfg->def, str.mdef)) { | 
 | milstr_ncpy(cfg->def, str.mdef, sizeof(cfg->def)); | milstr_ncpy(cfg->def, str.mdef, sizeof(cfg->def)); | 
 | update |= SYS_UPDATEOSCFG; | update |= SYS_UPDATEOSCFG; | 
| //                                      commsmidi_toneload(m->comm, str.mdef); | if (cm) { | 
|  | cm->msg(cm, COMMSG_MIMPIDEFFILE, (long)str.mdef); | 
|  | } | 
 | } | } | 
 | sysmng_update(update); | sysmng_update(update); | 
 | return(TRUE); | return(TRUE); | 
| Line 429  static void pc9861getspeed(HWND hWnd, co | Line 438  static void pc9861getspeed(HWND hWnd, co | 
 | static void pc9861getint(HWND hWnd, const PC9861MODE_T *m) { | static void pc9861getint(HWND hWnd, const PC9861MODE_T *m) { | 
 |  |  | 
 | LRESULT r; | LRESULT r; | 
| int             i; | UINT    i; | 
 |  |  | 
 | r = SendDlgItemMessage(hWnd, m->idc_int, CB_GETCURSEL, 0, 0); | r = SendDlgItemMessage(hWnd, m->idc_int, CB_GETCURSEL, 0, 0); | 
 | if (r != CB_ERR) { | if (r != CB_ERR) { | 
| Line 681  static LRESULT CALLBACK pc9861mainProc(H | Line 690  static LRESULT CALLBACK pc9861mainProc(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; | 
 | r = GetDlgItemCheck(hWnd, IDC_PC9861E); | r = GetDlgItemCheck(hWnd, IDC_PC9861E); | 
 | if (np2cfg.pc9861enable != r) { | if (np2cfg.pc9861enable != r) { | 
| Line 739  void dialog_serial(HWND hWnd) { | Line 748  void dialog_serial(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 = 4; | psh.nPages = 4; | 
 | psh.phpage = hpsp; | psh.phpage = hpsp; | 
 | psh.pszCaption = str_seropt; | psh.pszCaption = str_seropt; | 
 |  | psh.pfnCallback = np2class_propetysheet; | 
 | PropertySheet(&psh); | PropertySheet(&psh); | 
| InvalidateRect(hWndMain, NULL, TRUE); | InvalidateRect(hWnd, NULL, TRUE); | 
 | } | } | 
 |  |  |