X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f68042c444d0e46ef63a6d6cc765937bb380991..051205e611a461fa3c23d37a1bfa648834b885a0:/src/msw/dialog.cpp?ds=sidebyside diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index d1979b9a4e..dde02e52a8 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -26,6 +26,8 @@ #include "wx/frame.h" #include "wx/app.h" #include "wx/settings.h" +#include "wx/intl.h" +#include "wx/log.h" #endif #include "wx/msw/private.h" @@ -120,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 @@ -169,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. @@ -183,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)) { @@ -478,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