Nikolay Sivov : comctl32/ipaddress: Use cached colors instead of GetSysColor for IPAddress control.
Alexandre Julliard
julliard at winehq.org
Tue May 19 09:23:08 CDT 2009
Module: wine
Branch: master
Commit: 8806b1e83e3eeb5810428f374a1f0005fd88fd5e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8806b1e83e3eeb5810428f374a1f0005fd88fd5e
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Mon May 18 18:57:19 2009 +0400
comctl32/ipaddress: Use cached colors instead of GetSysColor for IPAddress control.
---
dlls/comctl32/ipaddress.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index a90f6e9..42ac703 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -158,18 +158,18 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
GetClientRect (infoPtr->Self, &rect);
if (infoPtr->Enabled) {
- bgCol = COLOR_WINDOW;
- fgCol = COLOR_WINDOWTEXT;
+ bgCol = comctl32_color.clrWindow;
+ fgCol = comctl32_color.clrWindowText;
} else {
- bgCol = COLOR_3DFACE;
- fgCol = COLOR_GRAYTEXT;
+ bgCol = comctl32_color.clr3dFace;
+ fgCol = comctl32_color.clrGrayText;
}
FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1));
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
- SetBkColor (hdc, GetSysColor(bgCol));
- SetTextColor(hdc, GetSysColor(fgCol));
+ SetBkColor (hdc, bgCol);
+ SetTextColor(hdc, fgCol);
for (i = 0; i < 3; i++) {
GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart);
@@ -595,6 +595,10 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;
+ case WM_SYSCOLORCHANGE:
+ COMCTL32_RefreshSysColors();
+ return 0;
+
case IPM_CLEARADDRESS:
IPADDRESS_ClearAddress (infoPtr);
break;
More information about the wine-cvs
mailing list