]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialog.cpp
1. Win9x support + async dialing + many more for wxDialUpManager
[wxWidgets.git] / src / msw / dialog.cpp
index 7870d6aebeccbd8994d61e4bfaf937be0684cdcb..d8ef9f1f46ea809219cf4c07b9c3a86f711c4c28 100644 (file)
@@ -123,7 +123,7 @@ 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 )
+    if ( style & wxRESIZE_BORDER )
         dlg = _T("wxResizeableDialog");
     else if ( style & wxCAPTION )
         dlg = _T("wxCaptionDialog");
@@ -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))
   {
@@ -284,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;