Commit 4de17c37 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

LISTVIEW_GetSubItemRect should succeed if subitem == 0 whatever mode

the listview is in.
parent 56121b71
......@@ -5410,16 +5410,18 @@ static BOOL LISTVIEW_GetSubItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lp
POINT Position;
LVITEMW lvItem;
if (!lprc || (infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return FALSE;
if (!lprc) return FALSE;
TRACE("(nItem=%d, nSubItem=%ld)\n", nItem, lprc->top);
/* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
if (lprc->top == 0)
return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
if ((infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return FALSE;
if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE;
lvItem.mask = lprc->top == 0 ? LVIF_INDENT : 0;
lvItem.mask = 0;
lvItem.iItem = nItem;
lvItem.iSubItem = lprc->top;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment