Alistair Leslie-Hughes : comctl32/trackbar: Use WM_CTLCOLORSTATIC when painting background.

Alexandre Julliard julliard at winehq.org
Mon Jul 25 10:02:29 CDT 2016


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Sun Jul 24 14:31:52 2016 +0300

comctl32/trackbar: Use WM_CTLCOLORSTATIC when painting background.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/trackbar.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index 43131ab..26f5cdc 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -952,8 +952,11 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
         if (GetWindowTheme (infoPtr->hwndSelf)) {
             DrawThemeParentBackground (infoPtr->hwndSelf, hdc, 0);
         }
-        else
-	    FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE));
+        else {
+            HBRUSH brush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLORSTATIC,
+                    (WPARAM)hdc, (LPARAM)infoPtr->hwndSelf);
+            FillRect (hdc, &rcClient, brush ? brush : GetSysColorBrush(COLOR_BTNFACE));
+        }
         if (gcdrf != CDRF_DODEFAULT)
 	    notify_customdraw(infoPtr, &nmcd, CDDS_POSTERASE);
     }




More information about the wine-cvs mailing list