Nikolay Sivov : comctl32/syslink: Use cached colors for SysLink.

Alexandre Julliard julliard at winehq.org
Tue May 19 09:23:09 CDT 2009


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Mon May 18 19:59:13 2009 +0400

comctl32/syslink: Use cached colors for SysLink.

---

 dlls/comctl32/syslink.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c
index 8f48b4c..1b89bc7 100644
--- a/dlls/comctl32/syslink.c
+++ b/dlls/comctl32/syslink.c
@@ -831,7 +831,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc)
 
     hOldFont = SelectObject(hdc, infoPtr->Font);
     OldTextColor = SetTextColor(hdc, infoPtr->TextColor);
-    OldBkColor = SetBkColor(hdc, GetSysColor(COLOR_BTNFACE));
+    OldBkColor = SetBkColor(hdc, comctl32_color.clrBtnFace);
     
     GetClientRect(infoPtr->Self, &rc);
     rc.right -= SL_RIGHTMARGIN + SL_LEFTMARGIN;
@@ -1729,9 +1729,9 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
         infoPtr->Items = NULL;
         infoPtr->HasFocus = FALSE;
         infoPtr->MouseDownID = -1;
-        infoPtr->TextColor = GetSysColor(COLOR_WINDOWTEXT);
-        infoPtr->LinkColor = GetSysColor(COLOR_HIGHLIGHT);
-        infoPtr->VisitedColor = GetSysColor(COLOR_HIGHLIGHT);
+        infoPtr->TextColor = comctl32_color.clrWindowText;
+        infoPtr->LinkColor = comctl32_color.clrHighlight;
+        infoPtr->VisitedColor = comctl32_color.clrHighlight;
         infoPtr->BreakChar = ' ';
         TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd);
         SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName);
@@ -1746,6 +1746,10 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
         Free (infoPtr);
         return 0;
 
+    case WM_SYSCOLORCHANGE:
+        COMCTL32_RefreshSysColors();
+        return 0;
+
     default:
 HandleDefaultMessage:
         if ((message >= WM_USER) && (message < WM_APP) && !COMCTL32_IsReflectedMessage(message))




More information about the wine-cvs mailing list