From 618837996d3f684d8962faa7debeac3f2b8ba235 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sun, 22 Feb 2015 13:18:41 +0000 Subject: [PATCH] [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 --- reactos/dll/win32/comctl32/rebar.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/reactos/dll/win32/comctl32/rebar.c b/reactos/dll/win32/comctl32/rebar.c index 58c459b34da..74ed1478b13 100644 --- a/reactos/dll/win32/comctl32/rebar.c +++ b/reactos/dll/win32/comctl32/rebar.c @@ -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; iuNumBands; 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; }