Use the DrawFocusRect function to draw the focus rect, instead of a

broken home-brewed solution.
This commit is contained in:
Robert Shearman 2005-01-11 10:43:03 +00:00 committed by Alexandre Julliard
parent 3dad1f9043
commit fbcc21be62
1 changed files with 2 additions and 7 deletions

View File

@ -337,7 +337,6 @@ static void MONTHCAL_DrawDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month
RECT r;
static int haveBoldFont, haveSelectedDay = FALSE;
HBRUSH hbr;
HPEN hNewPen, hOldPen = 0;
COLORREF oldCol = 0;
COLORREF oldBk = 0;
@ -394,12 +393,8 @@ static void MONTHCAL_DrawDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month
DrawTextA(hdc, buf, -1, &r, DT_CENTER | DT_VCENTER | DT_SINGLELINE );
/* draw a rectangle around the currently selected days text */
if((day==infoPtr->curSelDay) && (month==infoPtr->currentMonth)) {
hNewPen = CreatePen(PS_ALTERNATE, 0, GetSysColor(COLOR_WINDOWTEXT) );
hbr = GetSysColorBrush(COLOR_WINDOWTEXT);
FrameRect(hdc, &r, hbr);
SelectObject(hdc, hOldPen);
}
if((day==infoPtr->curSelDay) && (month==infoPtr->currentMonth))
DrawFocusRect(hdc, &r);
}