BM_GETSTATE

BM_GETSTATE

wParam = 0; /* not used, must be zero */

lParam = 0; /* not used, must be zero */

An application sends a BM_GETSTATE message to determine the state of a button control or check box.

Parameters

This message has no parameters.

Return Value

The return value specifies the current state of the button control. You can use the following masks to extract information about the state:

Value Meaning

0x0003 Specifies the check state (radio buttons and check boxes only). A value of 0 indicates the button is unchecked. A value of 1 indicates the button is checked. A radio button is checked when it contains a dot; a check box is checked when it contains an X. A value of 2 indicates the check state is indeterminate (3-state check boxes only). The state of a 3-state check box is indeterminate when it is grayed.
0x0004 Specifies the highlight state. A nonzero value indicates that the button is highlighted. A button is highlighted when the user presses and holds the left mouse button. The highlighting is removed when the user releases the mouse button.
0x0008 Specifies the focus state. A non-zero value indicates that the button has the focus.

See Also

BM_GETCHECK, BM_SETSTATE