Retrieves some or all of a list-view item's attributes. You can send this message explicitly or by using the ListView_GetItem macro.
Syntax
To send this message, call the
SendMessage
function as follows.
lResult = SendMessage( // returns LRESULT in lResult
hWndControl, // (HWND) handle to destination control
LVM_GETITEM, // (UINT) message ID
wParam, // = 0; not used, must be zero
lParam // = (LPARAM)(LPLVITEM) pitem;
);
Parameters
- wParam
-
Must be zero.
- pitem
-
Pointer to an LVITEM structure that specifies the information to retrieve and receives information about the list-view item.
Return Value
Returns TRUE if successful, or FALSE otherwise.
Remarks
When the LVM_GETITEM message is sent, the
iItem and iSubItem members identify the item or subitem to retrieve information about and the
mask member specifies which attributes to retrieve. For a list of possible values, see the description of the LVITEM structure.
If the LVIF_TEXT flag is set in the
mask member of the LVITEM structure, the pszText member must point to a valid buffer and the cchTextMax member must be set to the number of characters in that buffer. Applications should not assume that the text will necessarily be placed in the specified buffer. The control may instead change the pszText member of the structure to point to the new text, rather than place it in the buffer.
If the mask member specifies the LVIF_STATE value, the stateMask member must specify the item state bits to retrieve. On output, the state member contains the values of the specified state bits.
Message Information
| Header | commctrl.h |
|---|
| Minimum operating systems |
Windows NT 3.51, Windows 95 |
|---|