Expand Minimize

ListView_SetItemIndexState macro

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

hwndLV [in]

Type: HWND

A handle to the list-view control.

plvii [in]

Type: LVITEMINDEX*

A pointer to an LVITEMINDEX structure for the item. The caller is responsible for allocating this structure and setting the members.

data [in]

Type: UINT

The state to set on the item as one or more (as a bitwise combination) of the List-View Item States flags.

mask [in]

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

Returns one of the following values of type HRESULT.

Return codeDescription
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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft