bool wxDialog::IsModalShowing() const
{
- return wxModalDialogs.Find((wxDialog *)this) != NULL; // const_cast
+ return wxModalDialogs.Find(wxConstCast(this, wxDialog)) != NULL;
}
wxWindow *wxDialog::FindSuitableParent() const
// this will cause IsModalShowing() return FALSE and our local
// message loop will terminate
wxModalDialogs.DeleteObject(this);
+
+ // ensure that there is another message for this window so the
+ // ShowModal loop will exit and won't get stuck in GetMessage().
+ ::PostMessage(GetHwnd(), WM_NULL, 0, 0);
}
}
return TRUE;
}
+void wxDialog::Raise()
+{
+ ::SetForegroundWindow(GetHwnd());
+}
+
// a special version for Show(TRUE) for modal dialogs which returns return code
int wxDialog::ShowModal()
{