Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ListView_GetItemState macro (commctrl.h)
Gets the state of a list-view item. You can use this macro or send the LVM_GETITEMSTATE message explicitly.
Syntax
UINT ListView_GetItemState(
HWND hwndLV,
int i,
UINT mask
);
Parameters
hwndLV
Type: HWND
A handle to the list-view control.
i
Type: int
The index of the list-view item.
mask
Type: UINT
The state information to retrieve. This parameter can be a combination of the following values:
| Value | Meaning |
|---|---|
|
The item is marked for a cut-and-paste operation. |
|
The item is highlighted as a drag-and-drop target. |
|
The item has the focus, so it is surrounded by a standard focus rectangle. Although more than one item may be selected, only one item can have the focus. |
|
The item is selected. The appearance of a selected item depends on whether it has the focus and also on the system colors used for selection. |
|
Use this mask to retrieve the item's overlay image index. |
|
Use this mask to retrieve the item's state image index. |
Return value
Type: UINT
Returns the current state for the specified item. The only valid bits in the return value are those that correspond to the bits set in the mask parameter.
Remarks
An item's state information includes a set of bit flags as well as image list indexes that indicate the item's state image and overlay image.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | commctrl.h |
See also
Feedback
Was this page helpful?
