[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.

svn path=/trunk/; revision=66402
This commit is contained in:
Giannis Adamopoulos
2015-02-22 13:18:41 +00:00
parent 68f04beae4
commit 618837996d

View File

@@ -1828,16 +1828,25 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
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) {
oldrow = lpBand->iRow;
@@ -1928,6 +1937,16 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
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;
}