case WM_DESTROY:
{
SetupIsActive(0);
+ PostQuitMessage(0);
return TRUE;
}
break;
case PSN_WIZFINISH:
- /* Handle a Finish button click, if necessary */
+ DestroyWindow(GetParent(hwndDlg));
break;
default:
HPROPSHEETPAGE ahpsp[8];
PROPSHEETPAGE psp = {0};
UINT nPages = 0;
+ HWND hWnd;
+ MSG msg;
/* Clear setup data */
ZeroMemory(&SetupData, sizeof(SETUPDATA));
/* 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;
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);
}