comctl32: toolbar[2/4]: don't try to redraw buttons outside of the clipping rect

Mikołaj Zalewski mikolaj at zalewski.pl
Sat Oct 14 12:53:39 CDT 2006


Improves drawing speed
-------------- next part --------------
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index d2c646c..e129c54 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -1111,6 +1111,8 @@ TOOLBAR_Refresh (HWND hwnd, HDC hdc, PAI
     for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++)
     {
         BOOL bDraw;
+        if (!RectVisible(hdc, &btnPtr->rect))
+            continue;
         if (infoPtr->dwExStyle & TBSTYLE_EX_HIDECLIPPEDBUTTONS)
         {
             IntersectRect(&rcTemp, &rcClient, &btnPtr->rect);
-- 
1.4.2.3


More information about the wine-patches mailing list