From 37bc5d81e211bd08ba8ebb349848d5a54c2d3466 Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Mon, 15 Aug 2005 10:24:00 +0000 Subject: [PATCH] Improved trackbar theming. --- dlls/comctl32/trackbar.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index a91d307197b..5b113ec1731 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -582,8 +582,14 @@ TRACKBAR_DrawTics (TRACKBAR_INFO *infoPtr, HDC hdc, DWORD dwStyle) int ticFlags = dwStyle & 0x0f; LOGPEN ticPen = { PS_SOLID, {1, 0}, GetSysColor (COLOR_3DDKSHADOW) }; HPEN hOldPen, hTicPen; + HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); - /* create the pen to draw the tics with */ + if (theme) + { + int part = (dwStyle & TBS_VERT) ? TKP_TICSVERT : TKP_TICS; + GetThemeColor (theme, part, TSS_NORMAL, TMT_COLOR, &ticPen.lopnColor); + } + /* create the pen to draw the tics with */ hTicPen = CreatePenIndirect(&ticPen); hOldPen = hTicPen ? SelectObject(hdc, hTicPen) : 0; @@ -863,7 +869,10 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) /* Erase backbround */ if (gcdrf == CDRF_DODEFAULT || notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) { - FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE)); + if (GetWindowTheme (infoPtr->hwndSelf)) + DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient); + else + FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE)); if (gcdrf != CDRF_DODEFAULT) notify_customdraw(infoPtr, &nmcd, CDDS_POSTERASE); } -- 2.11.4.GIT