다음을 통해 공유


CListCtrl::SetItemIndexState

Sets the state of an item in the current list-view control.

BOOL SetItemIndexState(
          PLVITEMINDEX pItemIndex, 
          DWORD dwState, 
          DWORD dwMask
) const;

Parameters

Parameter

Description

[in] pItemIndex

Pointer to an LVITEMINDEX structure that describes an item. The caller is responsible for allocating this structure and setting its members.

[in] dwState

The state to set the item, which is a bitwise combination of list view item states. Specify zero to reset, or one to set, a state.

[in] dwMask

A mask of the valid bits of the state specified by the dwState parameter. Specify a bitwise combination (OR) of list view item states.

Return Value

true if this method is successful; otherwise, false.

Remarks

For more information about the dwState parameter, see List View Item States.

For more information about the dwMask parameter, see the stateMask member of the LVITEM structure.

This method sends the LVM_SETITEMINDEXSTATE message, which is described in the Windows SDK.

Requirements

Header: afxcmn.h

This control is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

See Also

Concepts

CListCtrl Class

CListCtrl Members

Hierarchy Chart

LVM_SETITEMINDEXSTATE

LVITEMINDEX

LVITEM

List View Item States