https://git.reactos.org/?p=reactos.git;a=commitdiff;h=92732f1bcfaa008774f21…
commit 92732f1bcfaa008774f21abcb01f9064ada0ca48
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Wed Jan 10 13:42:53 2018 +0200
[COMCTL32] rebar: Use DrawThemeText when drawing text with themes. CORE-13855
---
dll/win32/comctl32/rebar.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dll/win32/comctl32/rebar.c b/dll/win32/comctl32/rebar.c
index 4912b88264..525c4cc524 100644
--- a/dll/win32/comctl32/rebar.c
+++ b/dll/win32/comctl32/rebar.c
@@ -612,8 +612,16 @@ REBAR_DrawBand (HDC hdc, const REBAR_INFO *infoPtr, REBAR_BAND
*lpBand)
lpBand->clrFore;
oldcolor = SetTextColor (hdc, new);
}
- DrawTextW (hdc, lpBand->lpText, -1, &lpBand->rcCapText,
- DT_CENTER | DT_VCENTER | DT_SINGLELINE);
+
+ if (!theme)
+ {
+ DrawTextW (hdc, lpBand->lpText, -1, &lpBand->rcCapText, DT_CENTER |
DT_VCENTER | DT_SINGLELINE);
+ }
+ else
+ {
+ DrawThemeText(theme, hdc, 0, 0, lpBand->lpText, -1, DT_CENTER | DT_VCENTER |
DT_SINGLELINE, 0, &lpBand->rcCapText);
+ }
+
if (oldBkMode != TRANSPARENT)
SetBkMode (hdc, oldBkMode);
if (lpBand->clrFore != CLR_NONE)