Author: gadamopoulos
Date: Mon Feb 13 15:08:47 2017
New Revision: 73789
URL:
http://svn.reactos.org/svn/reactos?rev=73789&view=rev
Log:
[COMCTL32] -Fix drawing the borders of themed controls. Patch by Sylvain Deverre.
CORE-10761
Modified:
trunk/reactos/dll/win32/comctl32/listview.c
trunk/reactos/dll/win32/comctl32/theme_edit.c
trunk/reactos/dll/win32/comctl32/theme_listbox.c
trunk/reactos/dll/win32/comctl32/treeview.c
Modified: trunk/reactos/dll/win32/comctl32/listview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Mon Feb 13 15:08:47 2017
@@ -10637,8 +10637,10 @@
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);
Modified: trunk/reactos/dll/win32/comctl32/theme_edit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_e…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/theme_edit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/theme_edit.c [iso-8859-1] Mon Feb 13 15:08:47 2017
@@ -52,9 +52,11 @@
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);
Modified: trunk/reactos/dll/win32/comctl32/theme_listbox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_l…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/theme_listbox.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/theme_listbox.c [iso-8859-1] Mon Feb 13 15:08:47
2017
@@ -42,9 +42,11 @@
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);
Modified: trunk/reactos/dll/win32/comctl32/treeview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treevie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] Mon Feb 13 15:08:47 2017
@@ -5429,8 +5429,10 @@
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);