Reece H. Dunn : comctl32: Fixed drawing the trackbar background when themes are installed.

Alexandre Julliard julliard at winehq.org
Tue Oct 9 13:37:43 CDT 2007


Module: wine
Branch: master
Commit: 4b4cfff4bad305cbd3b882547f5a95c185733510
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4b4cfff4bad305cbd3b882547f5a95c185733510

Author: Reece H. Dunn <msclrhd at gmail.com>
Date:   Sun Oct  7 16:52:55 2007 +0100

comctl32: Fixed drawing the trackbar background when themes are installed.

---

 dlls/comctl32/trackbar.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index 1ae1f73..f95ec5e 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -824,6 +824,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
     HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
     NMCUSTOMDRAW nmcd;
     int gcdrf, icdrf;
+    HTHEME theme;
 
     if (infoPtr->flags & TB_THUMBCHANGED) {
         TRACKBAR_UpdateThumb (infoPtr);
@@ -868,8 +869,12 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
     /* Erase backbround */
     if (gcdrf == CDRF_DODEFAULT ||
         notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) {
-        if (GetWindowTheme (infoPtr->hwndSelf))
+        if ((theme = GetWindowTheme (infoPtr->hwndSelf))) {
+            DrawThemeBackground (theme, hdc,
+                (GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ?
+                    TKP_TRACKVERT : TKP_TRACK, TKS_NORMAL, &rcClient, 0);
             DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient);
+        }
         else
 	    FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE));
         if (gcdrf != CDRF_DODEFAULT)




More information about the wine-cvs mailing list