]> git.saurik.com Git - wxWidgets.git/commitdiff
ScrollWindow() should use the rect it scrolls as the clipping rect as well
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Feb 2002 01:32:55 +0000 (01:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Feb 2002 01:32:55 +0000 (01:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 738f94dda0a9833ceb049a2fb035440c8f41c997..285299a2ff7f5e9a7207caa13511a5ae07f86394 100644 (file)
@@ -901,16 +901,22 @@ void wxWindowMSW::SetScrollbar(int orient, int pos, int thumbVisible,
 
 void wxWindowMSW::ScrollWindow(int dx, int dy, const wxRect *prect)
 {
-    RECT rect;
+    RECT rect, *pr;
     if ( prect )
     {
         rect.left = prect->x;
         rect.top = prect->y;
         rect.right = prect->x + prect->width;
         rect.bottom = prect->y + prect->height;
+
+        pr = &rect;
+    }
+    else
+    {
+        pr = NULL;
     }
 
-    ::ScrollWindow(GetHwnd(), dx, dy, prect ? &rect : NULL, NULL);
+    ::ScrollWindow(GetHwnd(), dx, dy, pr, pr);
 }
 
 static bool ScrollVertically(HWND hwnd, int kind, int count)