]> git.saurik.com Git - wxWidgets.git/commitdiff
propgate WS_EX_CONTROLPARENT recursively upwards, not just to the immediate parent
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 26 Jun 2002 00:45:13 +0000 (00:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 26 Jun 2002 00:45:13 +0000 (00:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 20df0dd866a0c29e79c28333fda5b90259b5171e..08658aa717f0ea3c532f2c8715e20143f62d54d5 100644 (file)
@@ -3191,7 +3191,7 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate)
     {
         // there is no need to do anything for the top level windows
         const wxWindow *parent = GetParent();
-        if ( parent && !parent->IsTopLevel() )
+        while ( parent && !parent->IsTopLevel() )
         {
             LONG exStyle = ::GetWindowLong(GetHwndOf(parent), GWL_EXSTYLE);
             if ( !(exStyle & WS_EX_CONTROLPARENT) )
@@ -3200,6 +3200,8 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate)
                 ::SetWindowLong(GetHwndOf(parent), GWL_EXSTYLE,
                                 exStyle | WS_EX_CONTROLPARENT);
             }
+
+            parent = parent->GetParent();
         }
     }