mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-07 00:55:50 +00:00
comctl32/treeview: Do not draw client edge without WS_EX_CLIENTEDGE.
Fix foobar2000 having an extra edge around tree view non-client size box. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
19a77a8b6a
commit
8ce869f40b
|
@ -5498,18 +5498,25 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
|
|||
/* Draw themed border */
|
||||
static BOOL TREEVIEW_NCPaint (const TREEVIEW_INFO *infoPtr, HRGN region, LPARAM lParam)
|
||||
{
|
||||
HTHEME theme = GetWindowTheme (infoPtr->hwnd);
|
||||
int cxEdge, cyEdge;
|
||||
LONG ex_style;
|
||||
HTHEME theme;
|
||||
HDC dc;
|
||||
RECT r;
|
||||
HRGN cliprgn;
|
||||
int cxEdge = GetSystemMetrics (SM_CXEDGE),
|
||||
cyEdge = GetSystemMetrics (SM_CYEDGE);
|
||||
|
||||
ex_style = GetWindowLongW(infoPtr->hwnd, GWL_EXSTYLE);
|
||||
if (!(ex_style & WS_EX_CLIENTEDGE))
|
||||
return DefWindowProcW(infoPtr->hwnd, WM_NCPAINT, (WPARAM)region, lParam);
|
||||
|
||||
theme = GetWindowTheme(infoPtr->hwnd);
|
||||
if (!theme)
|
||||
return DefWindowProcW (infoPtr->hwnd, WM_NCPAINT, (WPARAM)region, lParam);
|
||||
|
||||
GetWindowRect(infoPtr->hwnd, &r);
|
||||
|
||||
cxEdge = GetSystemMetrics(SM_CXEDGE);
|
||||
cyEdge = GetSystemMetrics(SM_CYEDGE);
|
||||
cliprgn = CreateRectRgn (r.left + cxEdge, r.top + cyEdge,
|
||||
r.right - cxEdge, r.bottom - cyEdge);
|
||||
if (region != (HRGN)1)
|
||||
|
|
Loading…
Reference in a new issue