From c703c96a7816852f39489d10bc0f7cc223791efa Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Thu, 4 Mar 2021 16:47:37 +0800 Subject: [PATCH] comctl32/listview: Only draw themed frame when WS_EX_CLIENTEDGE is present. Signed-off-by: Zhiyi Zhang Signed-off-by: Alexandre Julliard --- 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; } /***