X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22cf5fec15463fae0fea4db2c95119018c60d3be..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/msw/dialog.cpp diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 0deadd900a..0ded488a51 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -124,11 +124,11 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, // 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 @@ -278,12 +278,12 @@ void wxDialog::GetPosition(int *x, int *y) const bool wxDialog::IsShown() const { - return wxModalDialogs.Find(this); + return m_isShown; } bool wxDialog::IsModal() const { - return wxModalDialogs. + return wxModalDialogs.Find((wxDialog *)this) != 0; // const_cast } bool wxDialog::Show(bool show) @@ -474,7 +474,9 @@ bool wxDialog::Show(bool show) if (hWndParent) ::BringWindowToTop(hWndParent); } - ShowWindow((HWND) GetHWND(), SW_HIDE); + + if ( m_hWnd ) + ShowWindow((HWND) GetHWND(), SW_HIDE); } } return TRUE;