Fix ListView_GetItemRect() macro.

Fix use of ListView_GetItemRect() macro in listview control.
Add some documentation to LISTVIEW_GetItemRect().
oldstable
Chris Morgan 2001-02-12 03:46:00 +00:00 committed by Alexandre Julliard
parent 4fb3aa5fcd
commit d62dd82efb
2 changed files with 14 additions and 3 deletions

View File

@ -5348,6 +5348,15 @@ static BOOL LISTVIEW_GetItemPosition(HWND hwnd, INT nItem,
* [I] HWND : window handle
* [I] INT : item index
* [IO] LPRECT : bounding rectangle coordinates
* lprc->left specifies the portion of the item for which the bounding
* rectangle will be retrieved.
*
* LVIR_BOUNDS Returns the bounding rectangle of the entire item,
* including the icon and label.
* LVIR_ICON Returns the bounding rectangle of the icon or small icon.
* LVIR_LABEL Returns the bounding rectangle of the item text.
* LVIR_SELECTBOUNDS Returns the union of the LVIR_ICON and LVIR_LABEL
* rectangles, but excludes columns in report view.
*
* RETURN:
* SUCCESS : TRUE
@ -7515,7 +7524,7 @@ static LRESULT LISTVIEW_Update(HWND hwnd, INT nItem)
{
/* get item bounding rectangle */
rc.left = LVIR_BOUNDS;
ListView_GetItemRect(hwnd, nItem, &rc);
ListView_GetItemRect(hwnd, nItem, &rc, rc.left);
InvalidateRect(hwnd, &rc, TRUE);
}
}

View File

@ -2884,8 +2884,10 @@ typedef struct tagNMLVCUSTOMDRAW
(INT)SendMessageA((hwnd),LVM_ARRANGE,(WPARAM)(INT)(code),0L)
#define ListView_GetItemPosition(hwnd,i,ppt) \
(INT)SendMessageA((hwnd),LVM_GETITEMPOSITION,(WPARAM)(INT)(i),(LPARAM)(LPPOINT)(ppt))
#define ListView_GetItemRect(hwnd,i,prc) \
(INT)SendMessageA((hwnd),LVM_GETITEMRECT,(WPARAM)(INT)(i),(LPARAM)(LPRECT)(prc))
#define ListView_GetItemRect(hwnd,i,prc,code) \
(BOOL)SendMessageA((hwnd), LVM_GETITEMRECT, (WPARAM)(int)(i), \
((prc) ? (((RECT*)(prc))->left = (code),(LPARAM)(RECT \
*)(prc)) : (LPARAM)(RECT*)NULL))
#define ListView_SetItemA(hwnd,pitem) \
(INT)SendMessageA((hwnd),LVM_SETITEMA,0,(LPARAM)(const LVITEMA *)(pitem))
#define ListView_SetItemW(hwnd,pitem) \