wxWindowList wxModelessWindows; // Frames and modeless dialogs
extern wxList WXDLLEXPORT wxPendingDelete;
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxPanel)
BEGIN_EVENT_TABLE(wxDialog, wxPanel)
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
EVT_CLOSE(wxDialog::OnCloseWindow)
END_EVENT_TABLE()
-#endif
wxDialog::wxDialog()
{
// otherwise it would look too strange)
const wxChar *dlg;
if ( style & wxRESIZE_BORDER )
- dlg = _T("wxResizeableDialog");
+ dlg = wxT("wxResizeableDialog");
else if ( style & wxCAPTION )
- dlg = _T("wxCaptionDialog");
+ dlg = wxT("wxCaptionDialog");
else
- dlg = _T("wxNoCaptionDialog");
+ dlg = wxT("wxNoCaptionDialog");
MSWCreate(m_windowId, parent, NULL, this, NULL,
x, y, width, height,
0, // style is not used if we have dlg template
cancelEvent.SetEventObject( this );
GetEventHandler()->ProcessEvent(cancelEvent);
+ // 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;
}
}
if (hWndParent)
::BringWindowToTop(hWndParent);
}
- ShowWindow((HWND) GetHWND(), SW_HIDE);
+
+ if ( m_hWnd )
+ ShowWindow((HWND) GetHWND(), SW_HIDE);
}
}
return TRUE;