]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Deprecate wxPathExists, make wxDirExists used everywhere, minor source cleaning.
[wxWidgets.git] / src / msw / window.cpp
index a2b52faf7a3e58c2a92b571ebfd968a902d46862..68136888e9a5bc3219772f966ea79570c5f9a597 100644 (file)
@@ -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
     }
 }