--- np2/win9x/dialog/d_serial.cpp 2003/10/22 14:13:25 1.4 +++ np2/win9x/dialog/d_serial.cpp 2003/11/03 00:49:55 1.8 @@ -6,6 +6,7 @@ #include "dosio.h" #include "commng.h" #include "sysmng.h" +#include "np2class.h" #include "dialog.h" #include "dialogs.h" #include "bit2res.h" @@ -153,6 +154,7 @@ static LRESULT CALLBACK dlgitem_proc(HWN } str; COMCFG *cfg; UINT update; + COMMNG cm; switch (msg) { case WM_INITDIALOG: @@ -288,12 +290,18 @@ static LRESULT CALLBACK dlgitem_proc(HWN } 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], str.mdef, sizeof(str.mdef)); if (milstr_cmp(cfg->def, str.mdef)) { milstr_ncpy(cfg->def, str.mdef, sizeof(cfg->def)); update |= SYS_UPDATEOSCFG; -// commsmidi_toneload(m->comm, str.mdef); + if (cm) { + cm->msg(cm, COMMSG_MIMPIDEFFILE, (long)str.mdef); + } } sysmng_update(update); return(TRUE); @@ -740,13 +748,15 @@ void dialog_serial(HWND hWnd) { ZeroMemory(&psh, sizeof(psh)); psh.dwSize = sizeof(PROPSHEETHEADER); - psh.dwFlags = PSH_NOAPPLYNOW; + psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEHICON | PSH_USECALLBACK; psh.hwndParent = hWnd; psh.hInstance = hinst; + psh.hIcon = LoadIcon(hinst, MAKEINTRESOURCE(IDI_ICON2)); psh.nPages = 4; psh.phpage = hpsp; psh.pszCaption = str_seropt; + psh.pfnCallback = np2class_propetysheet; PropertySheet(&psh); - InvalidateRect(hWndMain, NULL, TRUE); + InvalidateRect(hWnd, NULL, TRUE); }