Commit b853de80 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/syslink: Implement LWS_TRANSPARENT style.

parent 92c2d8af
......@@ -94,6 +94,7 @@ typedef struct
COLORREF TextColor; /* Color of the text */
COLORREF LinkColor; /* Color of links */
COLORREF VisitedColor; /* Color of visited links */
COLORREF BackColor; /* Background color, set on creation */
WCHAR BreakChar; /* Break Character for the current font */
} SYSLINK_INFO;
......@@ -831,7 +832,7 @@ static LRESULT SYSLINK_Draw (const SYSLINK_INFO *infoPtr, HDC hdc)
hOldFont = SelectObject(hdc, infoPtr->Font);
OldTextColor = SetTextColor(hdc, infoPtr->TextColor);
OldBkColor = SetBkColor(hdc, comctl32_color.clrBtnFace);
OldBkColor = SetBkColor(hdc, infoPtr->BackColor);
GetClientRect(infoPtr->Self, &rc);
rc.right -= SL_RIGHTMARGIN + SL_LEFTMARGIN;
......@@ -916,7 +917,7 @@ static LRESULT SYSLINK_EraseBkgnd (const SYSLINK_INFO *infoPtr, HDC hdc)
RECT r;
GetClientRect(infoPtr->Self, &r);
hbr = CreateSolidBrush(comctl32_color.clrBtnFace);
hbr = CreateSolidBrush(infoPtr->BackColor);
FillRect(hdc, &r, hbr);
DeleteObject(hbr);
......@@ -1749,6 +1750,8 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
infoPtr->TextColor = comctl32_color.clrWindowText;
infoPtr->LinkColor = comctl32_color.clrHighlight;
infoPtr->VisitedColor = comctl32_color.clrHighlight;
infoPtr->BackColor = infoPtr->Style & LWS_TRANSPARENT ?
comctl32_color.clrWindow : comctl32_color.clrBtnFace;
infoPtr->BreakChar = ' ';
TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd);
SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName);
......@@ -1765,6 +1768,8 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case WM_SYSCOLORCHANGE:
COMCTL32_RefreshSysColors();
if (infoPtr->Style & LWS_TRANSPARENT)
infoPtr->BackColor = comctl32_color.clrWindow;
return 0;
default:
......
......@@ -5052,6 +5052,9 @@ BOOL WINAPI Str_SetPtrW (LPWSTR *, LPCWSTR);
static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 };
#endif
/* SysLink styles */
#define LWS_TRANSPARENT 0x0001
/* SysLink messages */
#define LM_HITTEST (WM_USER + 768)
#define LM_GETIDEALHEIGHT (WM_USER + 769)
......
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