mirror of
https://github.com/reactos/reactos.git
synced 2026-06-05 19:43:39 +08:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user