Author: gschneider
Date: Sun Apr 25 14:13:01 2010
New Revision: 47011
URL:
http://svn.reactos.org/svn/reactos?rev=47011&view=rev
Log:
[SYSSETUP]
- Create a modeless syssetup dialog so we can explicitly ignore intermediate WM_CLOSE
messages (modal property sheets handle them automatically)
See issue #4960 for more details.
Modified:
trunk/reactos/dll/win32/syssetup/wizard.c
Modified: trunk/reactos/dll/win32/syssetup/wizard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Sun Apr 25 14:13:01 2010
@@ -1960,6 +1960,7 @@
case WM_DESTROY:
{
SetupIsActive(0);
+ PostQuitMessage(0);
return TRUE;
}
@@ -1999,7 +2000,7 @@
break;
case PSN_WIZFINISH:
- /* Handle a Finish button click, if necessary */
+ DestroyWindow(GetParent(hwndDlg));
break;
default:
@@ -2269,6 +2270,8 @@
HPROPSHEETPAGE ahpsp[8];
PROPSHEETPAGE psp = {0};
UINT nPages = 0;
+ HWND hWnd;
+ MSG msg;
/* Clear setup data */
ZeroMemory(&SetupData, sizeof(SETUPDATA));
@@ -2345,7 +2348,7 @@
/* Create the property sheet */
psh.dwSize = sizeof(PROPSHEETHEADER);
- psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
+ psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER | PSH_MODELESS;
psh.hInstance = hDllInstance;
psh.hwndParent = NULL;
psh.nPages = nPages;
@@ -2358,7 +2361,17 @@
SetupData.hTitleFont = CreateTitleFont();
/* Display the wizard */
- PropertySheet(&psh);
+ hWnd = (HWND)PropertySheet(&psh);
+ ShowWindow(hWnd, SW_SHOW);
+
+ while (GetMessage(&msg, NULL, 0, 0))
+ {
+ if(!IsDialogMessage(hWnd, &msg))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
DeleteObject(SetupData.hTitleFont);
}