Commit d57a61f8 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

comctl32: toolbar: Add support for WM_SETFONT.

parent d44b0dba
......@@ -5425,8 +5425,7 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot);
/* delete default font */
if (infoPtr->hFont)
DeleteObject (infoPtr->hDefaultFont);
DeleteObject (infoPtr->hDefaultFont);
CloseThemeData (GetWindowTheme (hwnd));
......@@ -6466,6 +6465,24 @@ TOOLBAR_SetFocus (HWND hwnd, WPARAM wParam)
return 0;
}
static LRESULT
TOOLBAR_SetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
TRACE("font=%p redraw=%ld\n", (HFONT)wParam, lParam);
if (wParam == 0)
infoPtr->hFont = infoPtr->hDefaultFont;
else
infoPtr->hFont = (HFONT)wParam;
TOOLBAR_CalcToolbar(hwnd);
if (lParam)
InvalidateRect(hwnd, NULL, TRUE);
return 1;
}
static LRESULT
TOOLBAR_SetRedraw (HWND hwnd, WPARAM wParam, LPARAM lParam)
......@@ -6976,6 +6993,9 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_SETFOCUS:
return TOOLBAR_SetFocus (hwnd, wParam);
case WM_SETFONT:
return TOOLBAR_SetFont(hwnd, wParam, lParam);
case WM_SETREDRAW:
return TOOLBAR_SetRedraw (hwnd, wParam, lParam);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment