Delen via


CCheckListBox::SetCheck

Sets the state of the specified check box.

void SetCheck(
   int nIndex,
   int nCheck 
);

Parameters

  • nIndex
    Zero-based index of a check box that is contained in the list box.

  • nCheck
    The button state for the specified check box. See the Remarks section for possible values.

Remarks

The following table lists possible values for the nCheck parameter.

Value

Description

BST_CHECKED

Select the specified check box.

BST_UNCHECKED

Clear the specified check box.

BST_INDETERMINATE

Set the specified check box state to indeterminate.

This state is only available if the check box style is BS_AUTO3STATE or BS_3STATE. For more information, see Button Styles.

Requirements

Header: afxwin.h

See Also

Reference

CCheckListBox Class

Hierarchy Chart

CCheckListBox::SetCheckStyle

CCheckListBox::GetCheck

CCheckListBox::GetCheckStyle