CListCtrl::SetItem

BOOL SetItem( const LVITEM* pItem );

BOOL SetItem( int nItem, int nSubItem, UINT nMask, LPCTSTR lpszItem, int nImage, UINT nState, UINT nStateMask, LPARAM lParam );

Return Value

Nonzero if successful; otherwise zero.

Parameters

pItem

Address of an LVITEM structure that contains the new item attributes, as described in the Platform SDK. The structure's iItem and iSubItem members identify the item or subitem, and the structure's mask member specifies which attributes to set. For more information on the mask member, see the Remarks.

nItem

Index of the item whose attributes are to be set.

nSubItem

Index of the subitem whose attributes are to be set.

nMask

Specifies which attributes are to be set (see the Remarks).

lpszItem

Address of a null-terminated string specifying the item’s label.

nImage

Index of the item’s image within the image list.

nState

Specifies values for states to be changed (see the Remarks).

nStateMask

Specifies which states are to be changed (see the Remarks).

lParam

A 32-bit application-specific value to be associated with the item.

Remarks

Sets some or all of a list view item’s attributes.

The iItem and iSubItem members of the LVITEM structure and the nItem and nSubItem parameters identify the item and subitem whose attributes are to be set.

The mask member of the LVITEM structure and the nMask parameter specify which item attributes are to be set:

Example

See the example for CListCtrl::HitTest.

CListCtrl OverviewClass MembersHierarchy Chart

See Also   CListCtrl::GetItem