[COMCTL32] -Fix drawing the borders of themed controls. Patch by Sylvain Deverre. CORE-10761

svn path=/trunk/; revision=73789
This commit is contained in:
Giannis Adamopoulos 2017-02-13 15:08:47 +00:00
parent a5ad497158
commit aae34d2409
4 changed files with 18 additions and 10 deletions

View file

@ -10637,8 +10637,10 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
CombineRgn (cliprgn, cliprgn, region, RGN_AND);
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW|DCX_INTERSECTRGN);
OffsetRect(&r, -r.left, -r.top);
dc = GetWindowDC(infoPtr->hwndSelf);
/* Exclude client part */
ExcludeClipRect(dc, r.left + cxEdge, r.top + cyEdge,
r.right - cxEdge, r.bottom -cyEdge);
if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0))
DrawThemeParentBackground(infoPtr->hwndSelf, dc, &r);

View file

@ -52,9 +52,11 @@ static void nc_paint (HTHEME theme, HWND hwnd, HRGN region)
CombineRgn (cliprgn, cliprgn, region, RGN_AND);
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN);
OffsetRect(&r, -r.left, -r.top);
dc = GetWindowDC(hwnd);
/* Exclude client part */
ExcludeClipRect(dc, r.left + cxEdge, r.top + cyEdge,
r.right - cxEdge, r.bottom -cyEdge);
if (IsThemeBackgroundPartiallyTransparent (theme, part, state))
DrawThemeParentBackground(hwnd, dc, &r);
DrawThemeBackground (theme, dc, part, state, &r, 0);

View file

@ -42,9 +42,11 @@ static void nc_paint (HTHEME theme, HWND hwnd, HRGN region)
CombineRgn (cliprgn, cliprgn, region, RGN_AND);
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN);
OffsetRect(&r, -r.left, -r.top);
dc = GetWindowDC(hwnd);
/* Exclude client part */
ExcludeClipRect(dc, r.left + cxEdge, r.top + cyEdge,
r.right - cxEdge, r.bottom -cyEdge);
if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0))
DrawThemeParentBackground(hwnd, dc, &r);
DrawThemeBackground (theme, dc, 0, 0, &r, 0);

View file

@ -5429,8 +5429,10 @@ static BOOL TREEVIEW_NCPaint (const TREEVIEW_INFO *infoPtr, HRGN region, LPARAM
CombineRgn (cliprgn, cliprgn, region, RGN_AND);
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(infoPtr->hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN);
OffsetRect(&r, -r.left, -r.top);
dc = GetWindowDC(infoPtr->hwnd);
/* Exclude client part */
ExcludeClipRect(dc, r.left + cxEdge, r.top + cyEdge,
r.right - cxEdge, r.bottom -cyEdge);
if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0))
DrawThemeParentBackground(infoPtr->hwnd, dc, &r);