CButton::GetState

Syntax

UINT GetState() const;

Return Value

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

Mask Meaning

0x0003 Specifies the check state (radio buttons and check boxes only). A 0 indicates the button is unchecked. A 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 . A 2 indicates the check state is indeterminate (three-state check boxes only). The state of a three-state check box is indeterminate when it contains a halftone pattern.
0x0004 Specifies the highlight state. A nonzero value indicates that the button is highlighted. A button is highlighted when the user clicks and holds the left mouse button. The highlighting is removed when the user releases the mouse button.
0x0008 Specifies the focus state. A nonzero value indicates that the button has the focus.

See Also

CButton::GetCheck, CButton::SetCheck, CButton::SetState, BM_GETSTATE