comctl32/listview: Only draw themed frame when WS_EX_CLIENTEDGE is present.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5ca79e66ad
commit
c703c96a78
|
@ -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;
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
Loading…
Reference in New Issue