X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8355a72fa5be63f25398b823c2e7533071b739aa..e1208c3103734c8581c9854c344b97323e381897:/src/msw/frame.cpp diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index eda1f2a749..08d33b8b77 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -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); } } }