comctl32: Disable owner of modal property sheets before creating the dialog.

This commit is contained in:
Vincent Povirk 2008-07-08 16:43:03 -05:00 committed by Alexandre Julliard
parent 57b25bcf48
commit 2893294f4b
2 changed files with 7 additions and 3 deletions

View File

@ -2784,17 +2784,21 @@ static INT do_loop(const PropSheetInfo *psInfo)
static INT_PTR PROPSHEET_PropertySheet(PropSheetInfo* psInfo, BOOL unicode)
{
INT_PTR bRet = 0;
HWND parent = NULL;
if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages);
psInfo->unicode = unicode;
psInfo->ended = FALSE;
if(!psInfo->isModeless)
{
parent = psInfo->ppshheader.hwndParent;
if (parent) EnableWindow(parent, FALSE);
}
bRet = PROPSHEET_CreateDialog(psInfo);
if(!psInfo->isModeless)
{
HWND parent = GetParent(psInfo->hwnd);
if (parent) EnableWindow(parent, FALSE);
bRet = do_loop(psInfo);
if (parent) EnableWindow(parent, TRUE);
}

View File

@ -140,7 +140,7 @@ static int CALLBACK disableowner_callback(HWND hwnd, UINT msg, LPARAM lparam)
{
case PSCB_INITIALIZED:
{
todo_wine ok(IsWindowEnabled(parent) == 0, "parent window should be disabled\n");
ok(IsWindowEnabled(parent) == 0, "parent window should be disabled\n");
PostQuitMessage(0);
return FALSE;
}