X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c589ad076cb531a3ef7808aaedadc03c8286942..b3818fbe8e439bc9af8c20371774520a5a2bc9c7:/src/msw/dialog.cpp diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index e73db1485f..dde02e52a8 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -122,13 +122,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, // 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; + const wxChar *dlg; if ( style & wxTHICK_FRAME ) - dlg = "wxResizeableDialog"; + 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 @@ -171,9 +171,10 @@ wxDialog::~wxDialog() 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. @@ -185,14 +186,10 @@ wxDialog::~wxDialog() } 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)) { @@ -480,7 +477,7 @@ bool wxDialog::Show(bool show) void wxDialog::SetTitle(const wxString& title) { - SetWindowText((HWND) GetHWND(), (const char *)title); + SetWindowText((HWND) GetHWND(), title.c_str()); } wxString wxDialog::GetTitle() const