From d41c9a3da410e7366ed51fae8258880ba8a37399 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Tue, 7 Nov 2000 20:28:11 +0000 Subject: [PATCH] Implemented the RedrawItems message for a listview. --- dlls/comctl32/listview.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 2ca516efd4d..de28b15ff18 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -17,7 +17,7 @@ * LISTVIEW_Notify : most notifications from children (editbox and header) * * Data structure: - * LISTVIEW_SetItemCount : not completed + * LISTVIEW_SetItemCount : not completed for non OWNERDATA * * Unicode: * LISTVIEW_SetItemW : no unicode support @@ -37,7 +37,6 @@ * LISTVIEW_Arrange : empty stub * LISTVIEW_ApproximateViewRect : incomplete * LISTVIEW_Scroll : not implemented - * LISTVIEW_RedrawItems : empty stub * LISTVIEW_Update : not completed */ @@ -6623,7 +6622,7 @@ static LRESULT LISTVIEW_RedrawItems(HWND hwnd, INT nFirst, INT nLast) { LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0); BOOL bResult = FALSE; - RECT rc; + RECT rcItem; if (nFirst <= nLast) { @@ -6631,8 +6630,13 @@ static LRESULT LISTVIEW_RedrawItems(HWND hwnd, INT nFirst, INT nLast) { if ((nLast >= 0) && (nLast < GETITEMCOUNT(infoPtr))) { - /* bResult = */ - InvalidateRect(hwnd, &rc, FALSE); + INT i; + for (i = nFirst; i <= nLast; i++) + { + rcItem.left = LVIR_BOUNDS; + LISTVIEW_GetItemRect(hwnd, i, &rcItem); + InvalidateRect(hwnd, &rcItem, TRUE); + } } } } @@ -7132,8 +7136,6 @@ static BOOL LISTVIEW_SetItemCount(HWND hwnd, INT nItems, DWORD dwFlags) { LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO*)GetWindowLongA(hwnd, 0); - FIXME("(%d %08lx)stub!\n", nItems, dwFlags); - if (GetWindowLongA(hwnd, GWL_STYLE) & LVS_OWNERDATA) { int precount,topvisible;