From fbcc21be62b03241bef1069395be5720907d8e1f Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 11 Jan 2005 10:43:03 +0000 Subject: [PATCH] Use the DrawFocusRect function to draw the focus rect, instead of a broken home-brewed solution. --- dlls/comctl32/monthcal.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 8f6e551e1da..55220d02b19 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -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); }