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.
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. |
The return value is always zero.
The BM_SETCHECK message has no effect on push buttons.
This example places a dot inside a radio button:
SendDlgItemMessage
(hdlg, ID_MYRADIOBUTTON, BM_SETCHECK, TRUE, 0L);