From 129862f3694fdd4f0badfc6f046a19b70810cf0b Mon Sep 17 00:00:00 2001 From: Mark Harmstone Date: Tue, 17 Feb 2015 23:39:16 +0000 Subject: [PATCH] comctl32: Themed buttons should not draw in System if font unset. --- dlls/comctl32/theme_button.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/theme_button.c b/dlls/comctl32/theme_button.c index 9b0a5cfda5e..5a3b4b4cb70 100644 --- a/dlls/comctl32/theme_button.c +++ b/dlls/comctl32/theme_button.c @@ -181,8 +181,10 @@ static void CB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN hPrevFont = SelectObject(hDC, font); created_font = TRUE; } - } else + } else { font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); + hPrevFont = SelectObject(hDC, font); + } GetClientRect(hwnd, &bgRect); GetThemeBackgroundContentRect(theme, hDC, part, state, &bgRect, &textRect); @@ -243,8 +245,10 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN hPrevFont = SelectObject(hDC, font); created_font = TRUE; } - } else + } else { font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); + hPrevFont = SelectObject(hDC, font); + } GetClientRect(hwnd, &bgRect); textRect = bgRect;