--- np2/win9xc/dialog/d_screen.cpp 2003/11/08 17:06:01 1.2 +++ np2/win9xc/dialog/d_screen.cpp 2005/03/20 08:58:20 1.5 @@ -14,14 +14,14 @@ #include "dialogs.h" -static const char str_scropt[] = "Screen option"; +static const TCHAR str_scropt[] = _T("Screen option"); static LRESULT CALLBACK Scropt1DlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { - char work[32]; - WORD ret; - BYTE b; + TCHAR work[32]; + UINT16 ret; + UINT8 b; int renewal; switch(msg) { @@ -40,7 +40,7 @@ static LRESULT CALLBACK Scropt1DlgProc(H return(TRUE); case WM_COMMAND: - switch (LOWORD(wp)) { + switch(LOWORD(wp)) { case IDC_LCD: EnableWindow(GetDlgItem(hWnd, IDC_LCDX), GetDlgItemCheck(hWnd, IDC_LCD)); @@ -51,7 +51,7 @@ static LRESULT CALLBACK Scropt1DlgProc(H case WM_HSCROLL: switch(GetDlgCtrlID((HWND)lp)) { case IDC_SKIPLIGHT: - ret = (WORD)SendDlgItemMessage(hWnd, IDC_SKIPLIGHT, + ret = (UINT16)SendDlgItemMessage(hWnd, IDC_SKIPLIGHT, TBM_GETPOS, 0, 0); wsprintf(work, str_d, ret); SetDlgItemText(hWnd, IDC_LIGHTSTR, work); @@ -60,15 +60,16 @@ static LRESULT CALLBACK Scropt1DlgProc(H break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { renewal = 0; b = GetDlgItemCheck(hWnd, IDC_SKIPLINE); if (np2cfg.skipline != b) { np2cfg.skipline = b; renewal = 1; } - if ((ret = (WORD)SendDlgItemMessage(hWnd, IDC_SKIPLIGHT, - TBM_GETPOS, 0, 0)) > 255) { + ret = (UINT16)SendDlgItemMessage(hWnd, IDC_SKIPLIGHT, + TBM_GETPOS, 0, 0); + if (ret > 255) { ret = 255; } if (np2cfg.skiplight != ret) { @@ -87,7 +88,7 @@ static LRESULT CALLBACK Scropt1DlgProc(H } if (renewal) { scrndraw_redraw(); - sysmng_update(update); + sysmng_update(SYS_UPDATECFG); } return(TRUE); } @@ -101,7 +102,7 @@ static const int gdcchip[4] = {IDC_GRCGN static LRESULT CALLBACK Scropt2DlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { - BYTE b; + UINT8 b; UINT update; switch(msg) { @@ -117,7 +118,7 @@ static LRESULT CALLBACK Scropt2DlgProc(H return(TRUE); case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { update = 0; b = GetDlgItemCheck(hWnd, IDC_GDC72020); if (np2cfg.uPD72020 != b) { @@ -148,9 +149,9 @@ static LRESULT CALLBACK Scropt2DlgProc(H static LRESULT CALLBACK Scropt3DlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { - char work[32]; - BYTE value[6]; - BYTE b; + TCHAR work[32]; + UINT8 value[6]; + UINT8 b; UINT update; switch(msg) { @@ -186,25 +187,25 @@ static LRESULT CALLBACK Scropt3DlgProc(H case WM_HSCROLL: switch(GetDlgCtrlID((HWND)lp)) { case IDC_TRAMWAIT: - b = (BYTE)SendDlgItemMessage(hWnd, IDC_TRAMWAIT, + b = (UINT8)SendDlgItemMessage(hWnd, IDC_TRAMWAIT, TBM_GETPOS, 0, 0); wsprintf(work, str_u, b); SetDlgItemText(hWnd, IDC_TRAMSTR, work); break; case IDC_VRAMWAIT: - b = (BYTE)SendDlgItemMessage(hWnd, IDC_VRAMWAIT, + b = (UINT8)SendDlgItemMessage(hWnd, IDC_VRAMWAIT, TBM_GETPOS, 0, 0); wsprintf(work, str_u, b); SetDlgItemText(hWnd, IDC_VRAMSTR, work); break; case IDC_GRCGWAIT: - b = (BYTE)SendDlgItemMessage(hWnd, IDC_GRCGWAIT, + b = (UINT8)SendDlgItemMessage(hWnd, IDC_GRCGWAIT, TBM_GETPOS, 0, 0); wsprintf(work, str_u, b); SetDlgItemText(hWnd, IDC_GRCGSTR, work); break; case IDC_REALPAL: - b = (BYTE)SendDlgItemMessage(hWnd, IDC_REALPAL, + b = (UINT8)SendDlgItemMessage(hWnd, IDC_REALPAL, TBM_GETPOS, 0, 0); wsprintf(work, str_d, (int)b - 32); SetDlgItemText(hWnd, IDC_REALPALSTR, work); @@ -212,7 +213,7 @@ static LRESULT CALLBACK Scropt3DlgProc(H break; case WM_NOTIFY: - if ((((NMHDR *)lp)->code) == PSN_APPLY) { + if ((((NMHDR *)lp)->code) == (UINT)PSN_APPLY) { update = 0; ZeroMemory(value, sizeof(value)); value[0] = (BYTE)SendDlgItemMessage(hWnd, IDC_TRAMWAIT,