--- np2/win9x/dialog/d_screen.cpp 2007/11/11 07:11:28 1.15 +++ np2/win9x/dialog/d_screen.cpp 2011/03/07 09:54:11 1.18 @@ -1,23 +1,31 @@ -#include "compiler.h" -#include -#include -#include "strres.h" -#include "resource.h" -#include "np2.h" -#include "oemtext.h" -#include "scrnmng.h" -#include "sysmng.h" -#include "np2class.h" -#include "dialog.h" -#include "dialogs.h" -#include "pccore.h" -#include "iocore.h" -#include "scrndraw.h" -#include "palettes.h" - - -static const TCHAR str_scropt[] = _T("Screen option"); - +/** + * @file d_screen.cpp + * @brief Screen configure dialog procedure + * + * @author $Author: yui $ + * @date $Date: 2011/03/07 09:54:11 $ + */ + +#include "compiler.h" +#include +#include +#include "strres.h" +#include "resource.h" +#include "np2.h" +#include "oemtext.h" +#include "scrnmng.h" +#include "sysmng.h" +#include "np2class.h" +#include "dialog.h" +#include "dialogs.h" +#include "pccore.h" +#include "iocore.h" +#include "scrndraw.h" +#include "palettes.h" + +#if !defined(__GNUC__) +#pragma comment(lib, "comctl32.lib") +#endif // !defined(__GNUC__) static LRESULT CALLBACK Scropt1DlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { @@ -276,7 +284,6 @@ static LRESULT CALLBACK ScroptFullScreen WPARAM wParam, LPARAM lParam) { UINT8 c; - UINT uUpdate; switch(uMsg) { @@ -319,9 +326,8 @@ static LRESULT CALLBACK ScroptFullScreen if (np2oscfg.fscrnmod != c) { np2oscfg.fscrnmod = c; - uUpdate |= SYS_UPDATEOSCFG; + sysmng_update(SYS_UPDATEOSCFG); } - sysmng_update(uUpdate); return(TRUE); } break; @@ -329,12 +335,13 @@ static LRESULT CALLBACK ScroptFullScreen return(FALSE); } -void dialog_scropt(HWND hWnd) { - +void dialog_scropt(HWND hWnd) +{ HINSTANCE hInstance; PROPSHEETPAGE psp; PROPSHEETHEADER psh; HPROPSHEETPAGE hpsp[4]; + TCHAR szTitle[128]; hInstance = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE); @@ -359,6 +366,8 @@ void dialog_scropt(HWND hWnd) { psp.pfnDlgProc = (DLGPROC)ScroptFullScreenDlgProc; hpsp[3] = CreatePropertySheetPage(&psp); + loadstringresource(IDS_SCREENOPTION, szTitle, NELEMENTS(szTitle)); + ZeroMemory(&psh, sizeof(psh)); psh.dwSize = sizeof(PROPSHEETHEADER); psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEHICON | PSH_USECALLBACK; @@ -367,7 +376,7 @@ void dialog_scropt(HWND hWnd) { psh.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON2)); psh.nPages = 4; psh.phpage = hpsp; - psh.pszCaption = str_scropt; + psh.pszCaption = szTitle; psh.pfnCallback = np2class_propetysheet; PropertySheet(&psh); InvalidateRect(hWnd, NULL, TRUE);