Listview items will be drawn with the right item dimensions.

This commit is contained in:
Noomen Hamza 1999-10-23 14:08:00 +00:00 committed by Alexandre Julliard
parent f0e0ded125
commit f4ca35f61c
1 changed files with 6 additions and 4 deletions

View File

@ -2084,6 +2084,8 @@ static VOID LISTVIEW_RefreshList(HWND hwnd, HDC hdc)
INT nItem; INT nItem;
INT nColumnCount; INT nColumnCount;
INT nCountPerColumn; INT nCountPerColumn;
INT nItemWidth = LISTVIEW_GetItemWidth(hwnd);
INT nItemHeight = LISTVIEW_GetItemHeight(hwnd);
/* get number of fully visible columns */ /* get number of fully visible columns */
nColumnCount = LISTVIEW_GetColumnCount(hwnd); nColumnCount = LISTVIEW_GetColumnCount(hwnd);
@ -2097,10 +2099,10 @@ static VOID LISTVIEW_RefreshList(HWND hwnd, HDC hdc)
if (nItem >= GETITEMCOUNT(infoPtr)) if (nItem >= GETITEMCOUNT(infoPtr))
return; return;
rcItem.top = j * infoPtr->nItemHeight; rcItem.top = j * nItemHeight;
rcItem.left = i * infoPtr->nItemWidth; rcItem.left = i * nItemWidth;
rcItem.bottom = rcItem.top + infoPtr->nItemHeight; rcItem.bottom = rcItem.top + nItemHeight;
rcItem.right = rcItem.left + infoPtr->nItemWidth; rcItem.right = rcItem.left + nItemWidth;
LISTVIEW_DrawItem(hwnd, hdc, nItem, rcItem); LISTVIEW_DrawItem(hwnd, hdc, nItem, rcItem);
} }
} }