bool wxDialog::Show(bool show)
{
+ // The following is required when the parent has been disabled,
+ // (modal dialogs, or modeless dialogs with disabling such as wxProgressDialog).
+ // Otherwise the parent disappears behind other windows when the dialog is hidden.
+ if (!show)
+ {
+ HWND hwndParent = GetParent() ? (HWND) GetParent()->GetHWND() : (HWND)NULL;
+ if ( hwndParent )
+ {
+ ::BringWindowToTop(hwndParent);
+ }
+ }
+
if ( !wxDialogBase::Show(show) )
{
// nothing to do
{
SetReturnCode(retCode);
- HWND hwndParent = GetParent() ? (HWND) GetParent()->GetHWND() : (HWND)NULL;
- if ( hwndParent )
- {
- ::BringWindowToTop(hwndParent);
- }
-
Show(FALSE);
}