]> git.saurik.com Git - wxWidgets.git/commitdiff
HandlePrintClient shouldn't go above a top-level window
authorJulian Smart <julian@anthemion.co.uk>
Wed, 11 May 2005 12:16:12 +0000 (12:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 11 May 2005 12:16:12 +0000 (12:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index af713e8df63071c5382bec2b158ff07b1f67a650..3d419c94d1f5303f99b30df37fd2d318099aec10 100644 (file)
@@ -4170,6 +4170,10 @@ bool wxWindowMSW::HandlePrintClient(WXHDC hDC)
     //
     // also note that in this case lParam == PRF_CLIENT but we're
     // clearly expected to paint the background and nothing else!
+
+    if ( IsTopLevel() || InheritsBackgroundColour() )
+        return false;
+
     for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
     {
         if ( win->MSWPrintChild(hDC, (wxWindow *)this) )