]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxCopyRectToRECT instead of duplicating it
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 May 2007 23:38:14 +0000 (23:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 May 2007 23:38:14 +0000 (23:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 929beded153c8ed82845f8adce7f7020b97d311e..79a98342db575713886ff3fe1185227f8c3013d4 100644 (file)
@@ -926,10 +926,7 @@ void wxWindowMSW::ScrollWindow(int dx, int dy, const wxRect *prect)
     RECT *pr;
     if ( prect )
     {
-        rect.left = prect->x;
-        rect.top = prect->y;
-        rect.right = prect->x + prect->width;
-        rect.bottom = prect->y + prect->height;
+        wxCopyRectToRECT(*prect, rect);
         pr = &rect;
     }
     else
@@ -1467,11 +1464,7 @@ void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
         const RECT *pRect;
         if ( rect )
         {
-            mswRect.left = rect->x;
-            mswRect.top = rect->y;
-            mswRect.right = rect->x + rect->width;
-            mswRect.bottom = rect->y + rect->height;
-
+            wxCopyRectToRECT(*rect, mswRect);
             pRect = &mswRect;
         }
         else