mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 08:13:18 +00:00
comctl32/monthcal: Implement handler for WM_ERASEBKGND.
This commit is contained in:
parent
840a39e90a
commit
7beaa88ed9
1 changed files with 20 additions and 8 deletions
|
@ -1015,8 +1015,7 @@ static void MONTHCAL_PaintCalendar(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTS
|
|||
|
||||
static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps)
|
||||
{
|
||||
RECT *title=&infoPtr->title;
|
||||
HBRUSH hbr;
|
||||
RECT *title = &infoPtr->title;
|
||||
COLORREF old_text_clr, old_bk_clr;
|
||||
HFONT old_font;
|
||||
RECT r_temp;
|
||||
|
@ -1025,11 +1024,6 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
|
|||
old_bk_clr = GetBkColor(hdc);
|
||||
old_font = GetCurrentObject(hdc, OBJ_FONT);
|
||||
|
||||
/* fill background */
|
||||
hbr = CreateSolidBrush (infoPtr->bk);
|
||||
FillRect(hdc, &ps->rcPaint, hbr);
|
||||
DeleteObject(hbr);
|
||||
|
||||
/* draw title, redraw all its elements */
|
||||
if(IntersectRect(&r_temp, &(ps->rcPaint), title))
|
||||
MONTHCAL_PaintTitle(infoPtr, hdc, ps);
|
||||
|
@ -1048,7 +1042,6 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT
|
|||
SetTextColor(hdc, old_text_clr);
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPRECT lpRect)
|
||||
{
|
||||
|
@ -2113,6 +2106,22 @@ MONTHCAL_Paint(MONTHCAL_INFO *infoPtr, HDC hdc_paint)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
MONTHCAL_EraseBkgnd(const MONTHCAL_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
HBRUSH hbr;
|
||||
RECT rc;
|
||||
|
||||
if (!GetClipBox(hdc, &rc)) return FALSE;
|
||||
|
||||
/* fill background */
|
||||
hbr = CreateSolidBrush (infoPtr->bk);
|
||||
FillRect(hdc, &rc, hbr);
|
||||
DeleteObject(hbr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
MONTHCAL_SetFocus(const MONTHCAL_INFO *infoPtr)
|
||||
{
|
||||
|
@ -2529,6 +2538,9 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_PAINT:
|
||||
return MONTHCAL_Paint(infoPtr, (HDC)wParam);
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return MONTHCAL_EraseBkgnd(infoPtr, (HDC)wParam);
|
||||
|
||||
case WM_SETFOCUS:
|
||||
return MONTHCAL_SetFocus(infoPtr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue