ListView_SetItemIndexState macro (commctrl.h)
Sets the state of a specified list-view item. Use this macro or send the LVM_SETITEMINDEXSTATE message explicitly.
Syntax
HRESULT ListView_SetItemIndexState(
[in] HWND hwndLV,
[in] LVITEMINDEX *plvii,
[in] UINT data,
[in] UINT mask
);
Parameters
[in] hwndLV
Type: HWND
A handle to the list-view control.
[in] plvii
Type: LVITEMINDEX*
A pointer to an LVITEMINDEX structure for the item. The caller is responsible for allocating this structure and setting the members.
[in] data
Type: UINT
The state to set on the item as one or more (as a bitwise combination) of the List-View Item States flags.
[in] mask
Type: UINT
The valid bits of the state specified by parameter data. For more information, see the stateMask member of the LVITEM) structure.
Return value
Type: HRESULT
Returns one of the following values of type HRESULT.
Return code | Description |
---|---|
E_FAIL | The state could not be set. |
E_UNEXPECTED | The list-view control was not ready for the operation. |
S_OK | The operation was successful. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | commctrl.h |