[04/13] comctl32/status: Use cached colors instead of GetSysColor for Status

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


Changelog:
    - Use cached colors instead of GetSysColor for Status

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

---
 dlls/comctl32/status.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 17ba1e9..f7d203b 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -167,7 +167,7 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect)
     pt.x = lpRect->right - 1;
     pt.y = lpRect->bottom - 1;
 
-    hPenFace = CreatePen( PS_SOLID, 1, GetSysColor( COLOR_3DFACE ));
+    hPenFace = CreatePen( PS_SOLID, 1, comctl32_color.clr3dFace);
     hOldPen = SelectObject( hdc, hPenFace );
     MoveToEx (hdc, pt.x - 12, pt.y, NULL);
     LineTo (hdc, pt.x, pt.y);
@@ -176,7 +176,7 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect)
     pt.x--;
     pt.y--;
 
-    hPenShadow = CreatePen( PS_SOLID, 1, GetSysColor( COLOR_3DSHADOW ));
+    hPenShadow = CreatePen( PS_SOLID, 1, comctl32_color.clr3dShadow);
     SelectObject( hdc, hPenShadow );
     for (i = 1; i < 11; i += 4) {
 	MoveToEx (hdc, pt.x - i, pt.y, NULL);
@@ -186,7 +186,7 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect)
 	LineTo (hdc, pt.x + 1, pt.y - i - 2);
     }
 
-    hPenHighlight = CreatePen( PS_SOLID, 1, GetSysColor( COLOR_3DHIGHLIGHT ));
+    hPenHighlight = CreatePen( PS_SOLID, 1, comctl32_color.clr3dHilight);
     SelectObject( hdc, hPenHighlight );
     for (i = 3; i < 13; i += 4) {
 	MoveToEx (hdc, pt.x - i, pt.y, NULL);
@@ -1313,6 +1313,10 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 	    if (STATUSBAR_WMSize (infoPtr, (WORD)wParam)) return 0;
             return DefWindowProcW (hwnd, msg, wParam, lParam);
 
+        case WM_SYSCOLORCHANGE:
+            COMCTL32_RefreshSysColors();
+            return 0;
+
         case WM_THEMECHANGED:
             return theme_changed (infoPtr);
 
-- 
1.5.6.5







More information about the wine-patches mailing list