Author: gadamopoulos
Date: Sun Feb 22 13:18:41 2015
New Revision: 66402

URL: http://svn.reactos.org/svn/reactos?rev=66402&view=rev
Log:
[COMCTL32]
- Rebar: paint the area that is not covered by the bands. This is a v6 feature 
and fixes the ugly non-painted rectangle in the taskbar.

Modified:
    trunk/reactos/dll/win32/comctl32/rebar.c

Modified: trunk/reactos/dll/win32/comctl32/rebar.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c?rev=66402&r1=66401&r2=66402&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/rebar.c    [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/rebar.c    [iso-8859-1] Sun Feb 22 
13:18:41 2015
@@ -1828,15 +1828,24 @@
     RECT cr;
     COLORREF old = CLR_NONE, new;
     HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
+    HRGN hrgn;
 
     GetClientRect (infoPtr->hwndSelf, &cr);
+    hrgn = CreateRectRgn(cr.left, cr.top, cr.right, cr.bottom);
 
     oldrow = -1;
     for(i=0; i<infoPtr->uNumBands; i++) {
         RECT rcBand;
+        HRGN hrgnBand;
+
         lpBand = REBAR_GetBand(infoPtr, i);
+
        if (HIDDENBAND(lpBand)) continue;
         translate_rect(infoPtr, &rcBand, &lpBand->rcBand);
+
+        hrgnBand = CreateRectRgn(rcBand.left, rcBand.top, rcBand.right, 
rcBand.bottom);
+        CombineRgn(hrgn, hrgn, hrgnBand, RGN_DIFF);
+        DeleteObject(hrgnBand);
 
        /* draw band separator between rows */
        if (lpBand->iRow != oldrow) {
@@ -1928,6 +1937,16 @@
                 SetBkColor (hdc, old);
         }
     }
+
+#if 1
+    {
+        //FIXME: Apparently painting the remaining area is a v6 feature
+        HBRUSH hbrush = CreateSolidBrush(new);
+        FillRgn(hdc, hrgn, hbrush);
+        DeleteObject(hbrush);
+        DeleteObject(hrgn);
+    }
+#endif
     return TRUE;
 }
 


Reply via email to