comctl32/monthcal: Fix today date box painting.

This commit is contained in:
Nikolay Sivov 2011-09-20 11:35:54 +04:00 committed by Alexandre Julliard
parent 57a70f4924
commit 229d4e2109
1 changed files with 11 additions and 5 deletions

View File

@ -987,14 +987,20 @@ static void MONTHCAL_PaintTodayTitle(const MONTHCAL_INFO *infoPtr, HDC hdc, cons
/* today mark + focus */ /* today mark + focus */
static void MONTHCAL_PaintFocusAndCircle(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps) static void MONTHCAL_PaintFocusAndCircle(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps)
{ {
if((infoPtr->minSel.wMonth == infoPtr->todaysDate.wMonth) && /* circle today date if only it's in fully visible month */
(infoPtr->minSel.wYear == infoPtr->todaysDate.wYear) && if (!(infoPtr->dwStyle & MCS_NOTODAYCIRCLE))
!(infoPtr->dwStyle & MCS_NOTODAYCIRCLE))
{ {
MONTHCAL_CircleDay(infoPtr, hdc, &infoPtr->todaysDate); INT i;
for (i = 0; i < MONTHCAL_GetCalCount(infoPtr); i++)
if (!MONTHCAL_CompareMonths(&infoPtr->todaysDate, &infoPtr->calendars[i].month))
{
MONTHCAL_CircleDay(infoPtr, hdc, &infoPtr->todaysDate);
break;
}
} }
if(!MONTHCAL_IsDateEqual(&infoPtr->focusedSel, &st_null)) if (!MONTHCAL_IsDateEqual(&infoPtr->focusedSel, &st_null))
{ {
RECT r; RECT r;
MONTHCAL_GetDayRect(infoPtr, &infoPtr->focusedSel, &r, -1); MONTHCAL_GetDayRect(infoPtr, &infoPtr->focusedSel, &r, -1);