X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edccf4281bc8fbb9d8151240ba5b208339c9ac11..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/msw/dialog.cpp?ds=sidebyside

diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp
index dde02e52a8..0ded488a51 100644
--- a/src/msw/dialog.cpp
+++ b/src/msw/dialog.cpp
@@ -123,12 +123,12 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
     // resizeable or not (but a resizeable dialog always has caption -
     // otherwise it would look too strange)
     const wxChar *dlg;
-    if ( style & wxTHICK_FRAME )
-        dlg = _T("wxResizeableDialog");
+    if ( style & wxRESIZE_BORDER )
+        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
@@ -281,6 +281,11 @@ bool wxDialog::IsShown() const
   return m_isShown;
 }
 
+bool wxDialog::IsModal() const
+{
+    return wxModalDialogs.Find((wxDialog *)this) != 0; // const_cast
+}
+
 bool wxDialog::Show(bool show)
 {
   m_isShown = show;
@@ -469,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;