LOGFONTW logfont;
COLORREF textColor;
COLORREF oldTextColor;
+ int align = CA_LEFT;
+ int drawStyles = DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS;
WCHAR buffer[50];
WCHAR *pszText = buffer;
else
textColor = GetSysColor(COLOR_CAPTIONTEXT);
+ GetThemeEnumValue(pcontext->theme, iPartId, iStateId, TMT_CONTENTALIGNMENT, &align);
+ if (align == CA_CENTER)
+ drawStyles |= DT_CENTER;
+ else if (align == CA_RIGHT)
+ drawStyles |= DT_RIGHT;
+
oldTextColor = SetTextColor(pcontext->hDC, textColor);
DrawThemeText(pcontext->theme,
pcontext->hDC,
iStateId,
pszText,
len - 1,
- DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS,
+ drawStyles,
0,
pRect);
SetTextColor(pcontext->hDC, oldTextColor);