From 3e33f61c562a53c62d2e66ab5abfb9c26f6237c2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 29 May 2013 15:55:32 +0200 Subject: [PATCH] comctl32/comboex: Add support for setting the font. --- dlls/comctl32/comboex.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 244cc950d02..f1acc7dc5dc 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -1607,6 +1607,15 @@ static LRESULT COMBOEX_Size (COMBOEX_INFO *infoPtr, INT width, INT height) return 0; } +static LRESULT COMBOEX_SetFont( COMBOEX_INFO *infoPtr, HFONT font, BOOL redraw ) +{ + infoPtr->font = font; + SendMessageW( infoPtr->hwndCombo, WM_SETFONT, (WPARAM)font, 0 ); + if (infoPtr->hwndEdit) SendMessageW( infoPtr->hwndEdit, WM_SETFONT, (WPARAM)font, 0 ); + COMBOEX_ReSize( infoPtr ); + if (redraw) InvalidateRect( infoPtr->hwndCombo, NULL, TRUE ); + return 0; +} static LRESULT COMBOEX_SetRedraw(const COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { @@ -2136,6 +2145,12 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_SIZE: return COMBOEX_Size (infoPtr, LOWORD(lParam), HIWORD(lParam)); + case WM_GETFONT: + return (LRESULT)infoPtr->font; + + case WM_SETFONT: + return COMBOEX_SetFont( infoPtr, (HFONT)wParam, LOWORD(lParam) != 0 ); + case WM_SETREDRAW: return COMBOEX_SetRedraw(infoPtr, wParam, lParam); -- 2.11.4.GIT