From c719013fd40f1d9f0cd1eff5be177da9a743d5c7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 9 Oct 2006 16:57:06 +0000 Subject: [PATCH] return false from IsDoubleBuffered() if the first top level parent is not double buffered git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e077df91af..bd7a853adf 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3952,13 +3952,12 @@ bool wxWindowMSW::HandlePower(WXWPARAM WXUNUSED_IN_WINCE(wParam), bool wxWindowMSW::IsDoubleBuffered() const { - const wxWindow* wnd = this; - - while ( wnd ) + for ( const wxWindow *wnd = this; + wnd && !wnd->IsTopLevel(); wnd = + wnd->GetParent() ) { - if ( ::GetWindowLong((HWND)wnd->GetHWND(), GWL_EXSTYLE) & WS_EX_COMPOSITED ) + if ( ::GetWindowLong(GetHwndOf(wnd), GWL_EXSTYLE) & WS_EX_COMPOSITED ) return true; - wnd = wnd->GetParent(); } return false; -- 2.45.2