Implemented LISTVIEW_ApproximateViewRect for LVS_REPORT.

This commit is contained in:
Aric Stewart 2004-02-20 01:05:39 +00:00 committed by Alexandre Julliard
parent bb6fde284e
commit d240ae8d62
1 changed files with 20 additions and 1 deletions

View File

@ -4000,7 +4000,26 @@ static DWORD LISTVIEW_ApproximateViewRect(LISTVIEW_INFO *infoPtr, INT nItemCount
dwViewRect = MAKELONG(wWidth, wHeight);
}
else if (uView == LVS_REPORT)
FIXME("uView == LVS_REPORT: not implemented\n");
{
RECT rcBox;
if (infoPtr->nItemCount > 0)
{
LISTVIEW_GetItemBox(infoPtr, 0, &rcBox);
wWidth = rcBox.right - rcBox.left;
wHeight = (rcBox.bottom - rcBox.top) * nItemCount;
}
else
{
/* use current height and width */
if (wHeight == 0xffff)
wHeight = infoPtr->rcList.bottom - infoPtr->rcList.top;
if (wWidth == 0xffff)
wWidth = infoPtr->rcList.right - infoPtr->rcList.left;
}
dwViewRect = MAKELONG(wWidth, wHeight);
}
else if (uView == LVS_SMALLICON)
FIXME("uView == LVS_SMALLICON: not implemented\n");
else if (uView == LVS_ICON)