use wxCopyRectToRECT instead of duplicating it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-05-09 23:38:14 +00:00
parent d5e0be7d42
commit f9c980f617

View File

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