uxtheme: Support DTT_FONTPROP for DrawThemeTextEx().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-02-22 22:32:56 +08:00 committed by Alexandre Julliard
parent a18df3a412
commit 300ecff145
1 changed files with 9 additions and 3 deletions

View File

@ -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)