[PATCH] comctl32/trackbar: Use WM_CTLCOLORSTATIC when painting background

Nikolay Sivov nsivov at codeweavers.com
Sun Jul 24 06:31:52 CDT 2016


From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

For https://bugs.winehq.org/show_bug.cgi?id=38310

 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);
     }
-- 
2.8.1




More information about the wine-patches mailing list