[03/13] comctl32/rebar: Use cached colors instead of GetSysColor for Rebar

Nikolay Sivov bunglehead at gmail.com
Mon May 18 12:19:34 CDT 2009


Changelog:
    - Use cached colors instead of GetSysColor for Rebar

>From b97cbaefaae0098233a1e51956f81af46a67f0fe Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Mon, 18 May 2009 19:07:00 +0400
Subject: Use cached colors instead of GetSysColor for Rebar

---
 dlls/comctl32/rebar.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 089da39..982c844 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -3190,8 +3190,8 @@ REBAR_NCCreate (HWND hwnd, LPARAM lParam)
     /* initialize info structure - initial values are 0 */
     infoPtr->clrBk = CLR_NONE;
     infoPtr->clrText = CLR_NONE;
-    infoPtr->clrBtnText = GetSysColor (COLOR_BTNTEXT);
-    infoPtr->clrBtnFace = GetSysColor (COLOR_BTNFACE);
+    infoPtr->clrBtnText = comctl32_color.clrBtnText;
+    infoPtr->clrBtnFace = comctl32_color.clrBtnFace;
     infoPtr->iOldBand = -1;
     infoPtr->ichevronhotBand = -2;
     infoPtr->iGrabbedBand = -1;
@@ -3720,10 +3720,9 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
         case WM_THEMECHANGED:
             return theme_changed (infoPtr);
 
-/*      case WM_SYSCOLORCHANGE: supported according to ControlSpy */
-/*      "Applications that have brushes using the existing system colors
-         should delete those brushes and recreate them using the new
-         system colors."  per MSDN                                */
+        case WM_SYSCOLORCHANGE:
+            COMCTL32_RefreshSysColors();
+            return 0;
 
 /*      case WM_VKEYTOITEM:     supported according to ControlSpy */
 /*	case WM_WININICHANGE: */
-- 
1.5.6.5







More information about the wine-patches mailing list