]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/gizmos/dynamicsash.cpp
reSWIGged
[wxWidgets.git] / contrib / src / gizmos / dynamicsash.cpp
index fa9ee2d62287735dbd88566cee899f74ed08e9da..08d1cecac76a4aa572ae9528b2245843cd3552bd 100644 (file)
     #include "wx/wx.h"
 #endif
 
+#ifdef __WXMSW__
+#include "wx/mdi.h"
+#endif
+
 #include "wx/gizmos/dynamicsash.h"
 
 
@@ -452,7 +456,11 @@ wxWindow *wxDynamicSashWindowImpl::FindFrame() const {
     wxWindow *win;
 
     win = m_window->GetParent();
-    while (win && !win->IsTopLevel()) {
+    while (win && !win->IsTopLevel()
+#ifdef __WXMSW__
+           && ! wxIsKindOf(win, wxMDIChildFrame)  // not top-level but still a frame
+#endif
+        ) {
         win = win->GetParent();
     }