Mark Harmstone : comctl32: Themed buttons should not draw in System if font unset.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 18 09:57:18 CST 2015
Module: wine
Branch: master
Commit: 129862f3694fdd4f0badfc6f046a19b70810cf0b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=129862f3694fdd4f0badfc6f046a19b70810cf0b
Author: Mark Harmstone <hellas at burntcomma.com>
Date: Tue Feb 17 23:39:16 2015 +0000
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 9b0a5cf..5a3b4b4 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;
More information about the wine-cvs
mailing list