Change order of EnableWindow/DestroyWindow in the case of failure in DIALOG_CreateControls32
Dmitry Timoshkov
dmitry at baikal.ru
Sat Mar 20 01:28:21 CST 2004
Hello,
There is a good article regarding it:
"The correct order for disabling and enabling windows"
http://weblogs.asp.net/oldnewthing/archive/2004/02/27/81155.aspx
We have to enable a dialog owner first and only then destroy a window
even in the case of dialog creation failure. DIALOG_DoDialogBox does
it in the correct order already.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Change order of EnableWindow/DestroyWindow in the case of failure
in DIALOG_CreateControls32.
--- cvs/hq/wine/windows/dialog.c Thu Feb 12 13:30:00 2004
+++ wine/windows/dialog.c Sat Mar 20 07:05:24 2004
@@ -688,8 +688,8 @@ static HWND DIALOG_CreateIndirect( HINST
}
return hwnd;
}
- if( IsWindow(hwnd) ) DestroyWindow( hwnd );
if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
+ if( IsWindow(hwnd) ) DestroyWindow( hwnd );
return 0;
}
More information about the wine-patches
mailing list