Commit d62dd82e authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard

Fix ListView_GetItemRect() macro.

Fix use of ListView_GetItemRect() macro in listview control. Add some documentation to LISTVIEW_GetItemRect().
parent 4fb3aa5f
......@@ -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);
}
}
......
......@@ -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) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment