]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Unicode-related compile fixes
[wxWidgets.git] / src / msw / window.cpp
index 7a81ded775d3a494a077a7c5d581211b2019e1cb..5ddf3d7a8cc966f7d19b942d1868ff3d3d31d08b 100644 (file)
@@ -4262,13 +4262,14 @@ bool wxWindowMSW::HandlePower(WXWPARAM WXUNUSED_IN_WINCE(wParam),
 
 bool wxWindowMSW::IsDoubleBuffered() const
 {
-    const wxWindowMSW *wnd = this;
-    do
+    for ( const wxWindowMSW *win = this; win; win = win->GetParent() )
     {
-        if ( wxHasWindowExStyle(wnd, WS_EX_COMPOSITED) )
+        if ( wxHasWindowExStyle(win, WS_EX_COMPOSITED) )
             return true;
-        wnd = wnd->GetParent();
-    } while ( wnd && !wnd->IsTopLevel() );
+
+        if ( win->IsTopLevel() )
+            break;
+    }
 
     return false;
 }