X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dc993cbfc601b70a4ddb567cebb5c0780eb4775a..da865fdd325f7833246eecd665849b14f43e19d7:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a2b52faf7a..68136888e9 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1324,18 +1324,31 @@ void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect) HWND hWnd = GetHwnd(); if ( hWnd ) { + RECT mswRect; + const RECT *pRect; if ( rect ) { - RECT mswRect; mswRect.left = rect->x; mswRect.top = rect->y; mswRect.right = rect->x + rect->width; mswRect.bottom = rect->y + rect->height; - ::InvalidateRect(hWnd, &mswRect, eraseBack); + pRect = &mswRect; } else - ::InvalidateRect(hWnd, NULL, eraseBack); + { + pRect = NULL; + } + +#ifndef __SMARTPHONE__ + UINT flags = RDW_INVALIDATE | RDW_ALLCHILDREN; + if ( eraseBack ) + flags |= RDW_ERASE; + + ::RedrawWindow(hWnd, pRect, NULL, flags); +#else + ::InvalidateRect(hWnd, pRect, eraseBack); +#endif } }