BM_SETCHECK

2.x

BM_SETCHECK
wParam = (WPARAM) fCheck; /* check state            */
lParam = 0L;              /* not used, must be zero */

An application sends a BM_SETCHECK message to set the check state of a button.

Parameters

fCheck

Value of wParam. Specifies the check state. This parameter can be one of the following values:

Value Meaning

0 Set the button state to unchecked.
1 Set the button state to checked.
2 Set the button state to indeterminate. This value can be used only if the button has the BS_3STATE or BS_AUTO3STATE style.

Return Value

The return value is always zero.

Comments

The BM_SETCHECK message has no effect on push buttons.

Example

This example places a dot inside a radio button:

SendDlgItemMessage(hdlg, ID_MYRADIOBUTTON, BM_SETCHECK, TRUE, 0L);

See Also

BM_GETCHECK, BM_GETSTATE, BM_SETSTATE