Handle WM_GETFONT and WM_SETFONT.

This commit is contained in:
Michael Kaufmann 2005-08-22 09:20:36 +00:00 committed by Alexandre Julliard
parent b6aeb56d0b
commit 1845444424
1 changed files with 15 additions and 0 deletions

View File

@ -1163,6 +1163,15 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, LPSTYLESTRUCT l
} }
static LRESULT
DATETIME_SetFont (DATETIME_INFO *infoPtr, HFONT font, BOOL repaint)
{
infoPtr->hFont = font;
if (repaint) InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
return 0;
}
static LRESULT static LRESULT
DATETIME_Create (HWND hwnd, LPCREATESTRUCTW lpcs) DATETIME_Create (HWND hwnd, LPCREATESTRUCTW lpcs)
{ {
@ -1314,6 +1323,12 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_STYLECHANGED: case WM_STYLECHANGED:
return DATETIME_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam); return DATETIME_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
case WM_SETFONT:
return DATETIME_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
case WM_GETFONT:
return (LRESULT) infoPtr->hFont;
default: default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP)) if ((uMsg >= WM_USER) && (uMsg < WM_APP))
ERR("unknown msg %04x wp=%08x lp=%08lx\n", ERR("unknown msg %04x wp=%08x lp=%08lx\n",