[PATCH 3/5] comctl32/listview: Only draw themed frame when WS_EX_CLIENTEDGE is present.
Zhiyi Zhang
zzhang at codeweavers.com
Thu Mar 4 02:47:37 CST 2021
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/comctl32/listview.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index a62ac4398cc..150771b8937 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -10612,11 +10612,11 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr)
* [I] region : update region
*
* RETURN:
- * TRUE - frame was painted
- * FALSE - call default window proc
+ * 0 - frame was painted
*/
-static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
+static LRESULT LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
{
+ LONG exstyle = GetWindowLongW (infoPtr->hwndSelf, GWL_EXSTYLE);
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
HDC dc;
RECT r;
@@ -10624,7 +10624,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
int cxEdge = GetSystemMetrics (SM_CXEDGE),
cyEdge = GetSystemMetrics (SM_CYEDGE);
- if (!theme)
+ if (!theme || !(exstyle & WS_EX_CLIENTEDGE))
return DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)region, 0);
GetWindowRect(infoPtr->hwndSelf, &r);
@@ -10646,7 +10646,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)cliprgn, 0);
DeleteObject(cliprgn);
- return FALSE;
+ return 0;
}
/***
--
2.27.0
More information about the wine-devel
mailing list