Zhiyi Zhang : uxtheme: Support DTT_FONTPROP for DrawThemeTextEx().
Alexandre Julliard
julliard at winehq.org
Mon Feb 22 15:43:22 CST 2021
Module: wine
Branch: master
Commit: 300ecff14545a508d42f97406c5ba5130a5d9c76
URL: https://source.winehq.org/git/wine.git/?a=commit;h=300ecff14545a508d42f97406c5ba5130a5d9c76
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Mon Feb 22 22:32:56 2021 +0800
uxtheme: Support DTT_FONTPROP for DrawThemeTextEx().
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/uxtheme/draw.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c
index 023b2dfd61b..8c3c4ae2218 100644
--- a/dlls/uxtheme/draw.c
+++ b/dlls/uxtheme/draw.c
@@ -1660,6 +1660,7 @@ HRESULT WINAPI DrawThemeTextEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId
COLORREF textColor;
COLORREF oldTextColor;
int oldBkMode;
+ int fontProp;
TRACE("%p %p %d %d %s:%d 0x%08x %p %p\n", hTheme, hdc, iPartId, iStateId,
debugstr_wn(pszText, iCharCount), iCharCount, flags, rect, options);
@@ -1667,10 +1668,15 @@ HRESULT WINAPI DrawThemeTextEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId
if(!hTheme)
return E_HANDLE;
- if (options->dwFlags & ~DTT_TEXTCOLOR)
+ if (options->dwFlags & ~(DTT_TEXTCOLOR | DTT_FONTPROP))
FIXME("unsupported flags 0x%08x\n", options->dwFlags);
-
- hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, TMT_FONT, &logfont);
+
+ if (options->dwFlags & DTT_FONTPROP)
+ fontProp = options->iFontPropId;
+ else
+ fontProp = TMT_FONT;
+
+ hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, fontProp, &logfont);
if(SUCCEEDED(hr)) {
hFont = CreateFontIndirectW(&logfont);
if(!hFont)
More information about the wine-cvs
mailing list