ListView_SetCheckState macro (commctrl.h)

Selects or deselects an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.

Syntax

void ListView_SetCheckState(
   hwndLV,
   i,
   fCheck
);

Parameters

hwndLV

Type: HWND

A handle to a list-view control.

i

Type: UINT

The index of the item for which to set the check state.

fCheck

Type: BOOL

A value that is set to TRUE to select the item, or FALSE to deselect it.

Return value

None

Remarks

This macro should only be used for list-view controls with the LVS_EX_CHECKBOXES style.

Requirements

   
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

ListView_SetItemState