Module: wine Branch: master Commit: 3e33f61c562a53c62d2e66ab5abfb9c26f6237c2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e33f61c562a53c62d2e66ab5a...
Author: Alexandre Julliard julliard@winehq.org Date: Wed May 29 15:55:32 2013 +0200
comctl32/comboex: Add support for setting the font.
---
dlls/comctl32/comboex.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 244cc95..f1acc7d 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);