From: Václav Slavík <vslavik@fastmail.fm>
Date: Sat, 25 Nov 2000 23:13:29 +0000 (+0000)
Subject: added wxFrame::IsMDIChild() (msw only, protected)
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/91dd52fe3ba8275366cf26a729f00a6a59d34855

added wxFrame::IsMDIChild() (msw only, protected)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h
index 410081887e..325f0acc51 100644
--- a/include/wx/msw/frame.h
+++ b/include/wx/msw/frame.h
@@ -141,6 +141,8 @@ protected:
 
     // window proc for the frames
     long MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
+    
+    virtual bool IsMDIChild() const { return FALSE; }
 
     bool                  m_iconized;
     WXHICON               m_defaultIcon;
diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h
index 385659df1c..891aaff8c5 100644
--- a/include/wx/msw/mdi.h
+++ b/include/wx/msw/mdi.h
@@ -174,6 +174,7 @@ protected:
     virtual void DoGetPosition(int *x, int *y) const;
     virtual void DoSetClientSize(int width, int height);
     virtual void InternalSetMenuBar();
+    virtual bool IsMDIChild() const { return TRUE; }
 
     // common part of all ctors
     void Init();
diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp
index 501b0fe8b6..10ecf1553a 100644
--- a/src/msw/frame.cpp
+++ b/src/msw/frame.cpp
@@ -807,7 +807,7 @@ void wxFrame::IconizeChildFrames(bool bIconize)
         // 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) )
+        if ( frame && !frame->IsMDIChild() )
         {
             frame->Iconize(bIconize);
         }