From 91dd52fe3ba8275366cf26a729f00a6a59d34855 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 25 Nov 2000 23:13:29 +0000 Subject: [PATCH] added wxFrame::IsMDIChild() (msw only, protected) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/frame.h | 2 ++ include/wx/msw/mdi.h | 1 + src/msw/frame.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.45.2