comctl32/listview: Improve item position calculating in LVS_REPORT.

This commit is contained in:
Nikolay Sivov 2009-05-26 04:04:36 +04:00 committed by Alexandre Julliard
parent 25c775a036
commit 2a32ce744c
2 changed files with 5 additions and 2 deletions

View File

@ -1920,7 +1920,10 @@ static void LISTVIEW_GetItemOrigin(const LISTVIEW_INFO *infoPtr, INT nItem, LPPO
}
else /* LVS_REPORT */
{
lpptPosition->x = 0;
lpptPosition->x = REPORT_MARGINX;
/* item is always at zero indexed column */
if (DPA_GetPtrCount(infoPtr->hdpaColumns) > 0)
lpptPosition->x += LISTVIEW_GetColumnInfo(infoPtr, 0)->rcHeader.left;
lpptPosition->y = nItem * infoPtr->nItemHeight;
}
}

View File

@ -2538,7 +2538,7 @@ static void test_getitemposition(void)
memset(&rect, 0, sizeof(rect));
SendMessage(header, HDM_GETITEMRECT, 0, (LPARAM)&rect);
/* some padding? */
todo_wine expect(2, pt.x);
expect(2, pt.x);
/* offset by header height */
expect(rect.bottom - rect.top, pt.y);