// Allows creation of dialogs with & without captions under MSWindows,
// resizeable or not (but a resizeable dialog always has caption -
// otherwise it would look too strange)
- const char *dlg;
- if ( style & wxTHICK_FRAME )
- dlg = "wxResizeableDialog";
+ const wxChar *dlg;
+ if ( style & wxRESIZE_BORDER )
+ dlg = _T("wxResizeableDialog");
else if ( style & wxCAPTION )
- dlg = "wxCaptionDialog";
+ dlg = _T("wxCaptionDialog");
else
- dlg = "wxNoCaptionDialog";
+ dlg = _T("wxNoCaptionDialog");
MSWCreate(m_windowId, parent, NULL, this, NULL,
x, y, width, height,
0, // style is not used if we have dlg template
wxTopLevelWindows.DeleteObject(this);
+ Show(FALSE);
+
if (m_modalShowing)
{
- Show(FALSE);
// For some reason, wxWindows can activate another task altogether
// when a frame is destroyed after a modal dialog has been invoked.
// Try to bring the parent to the top.
}
m_modalShowing = FALSE;
- if ( GetHWND() )
- ShowWindow((HWND) GetHWND(), SW_HIDE);
if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL )
wxModelessWindows.DeleteObject(this);
- UnsubclassWin();
-
// If this is the last top-level window, exit.
if (wxTheApp && (wxTopLevelWindows.Number() == 0))
{
void wxDialog::SetTitle(const wxString& title)
{
- SetWindowText((HWND) GetHWND(), (const char *)title);
+ SetWindowText((HWND) GetHWND(), title.c_str());
}
wxString wxDialog::GetTitle() const