]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
Lotta stuff for drawing etc.
[wxWidgets.git] / src / msw / frame.cpp
index eda1f2a749beb8f82671ba175001076323d4c31e..08d33b8b77bbe025a0b9cb1828bbb293059320e7 100644 (file)
@@ -37,6 +37,7 @@
     #include "wx/dialog.h"
     #include "wx/settings.h"
     #include "wx/dcclient.h"
+    #include "wx/mdi.h"
 #endif // WX_PRECOMP
 
 #include "wx/msw/private.h"
@@ -805,9 +806,12 @@ void wxFrame::IconizeChildFrames(bool bIconize)
     {
         wxWindow *win = node->GetData();
 
-        if ( win->IsKindOf(CLASSINFO(wxFrame)) )
+        // the child MDI frames are a special case and should not be touched by
+        // the parent frame - instead, they are managed by the user
+        wxFrame *frame = wxDynamicCast(win, wxFrame);
+        if ( frame && !wxDynamicCast(frame, wxMDIChildFrame) )
         {
-            ((wxFrame *)win)->Iconize(bIconize);
+            frame->Iconize(bIconize);
         }
     }
 }