comctl32/monthcal: Erase week numbers rectangle before drawing new text.

This commit is contained in:
Nikolay Sivov 2010-08-02 09:48:07 +04:00 committed by Alexandre Julliard
parent 49949cbbc2
commit 7fb6031731
1 changed files with 8 additions and 0 deletions

View File

@ -799,6 +799,7 @@ static void MONTHCAL_PaintWeeknumbers(const MONTHCAL_INFO *infoPtr, HDC hdc, con
INT i, prev_month;
SYSTEMTIME st;
WCHAR buf[80];
HBRUSH hbr;
RECT r;
if (!(infoPtr->dwStyle & MCS_WEEKNUMBERS)) return;
@ -868,6 +869,13 @@ static void MONTHCAL_PaintWeeknumbers(const MONTHCAL_INFO *infoPtr, HDC hdc, con
}
r = infoPtr->calendars[calIdx].weeknums;
/* erase whole week numbers area */
hbr = CreateSolidBrush(infoPtr->monthbk);
FillRect(hdc, &r, hbr);
DeleteObject(hbr);
/* reduce rectangle to one week number */
r.bottom = r.top + infoPtr->height_increment;
for(i = 0; i < 6; i++) {