Commit 8806b1e8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/ipaddress: Use cached colors instead of GetSysColor for IPAddress control.

parent bdd4e0b4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment