[COMCTL32] rebar: Use DrawThemeText when drawing text with themes. CORE-13855
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Wed, 10 Jan 2018 11:42:53 +0000 (13:42 +0200)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Wed, 10 Jan 2018 11:44:32 +0000 (13:44 +0200)
dll/win32/comctl32/rebar.c

index 4912b88..525c4cc 100644 (file)
@@ -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)