CWnd::CheckDlgButton
voidCheckDlgButton(intnIDButton**,UINTnCheck);**
Parameters
nIDButton
Specifies the button to be modified.
nCheck
Specifies the action to take. If nCheck is nonzero, the CheckDlgButton member function places a check mark next to the button; if 0, the check mark is removed. For three-state buttons, if nCheck is 2, the button state is indeterminate.
Remarks
Selects (places a check mark next to) or clears (removes a check mark from) a button, or it changes the state of a three-state button.
The CheckDlgButton function sends a message to the specified button.
Example
// Sets 3 check buttons in various ways. Note BST_INDETERMINATE
// requires BS_3STATE or BS_AUTO3STATE in the button's style.
void CMyDlg::OnMarkButtons()
{
CheckDlgButton(IDC_CHECK1, BST_UNCHECKED); // 0
CheckDlgButton(IDC_CHECK2, BST_CHECKED); // 1
CheckDlgButton(IDC_CHECK3, BST_INDETERMINATE); // 2
}
CWnd Overview | Class Members | Hierarchy Chart
See Also CWnd::IsDlgButtonChecked, CButton::SetCheck,