Changes to a Button State

When the user selects a button, either the operating system or the application must change one or more of the button's state elements. Windows CE automatically changes the focus state for all button types, the push state for push buttons, and the check state for all automatic buttons. The application must make all other state changes, taking into account the button's type, style, and current state. For example, an application must change the check state for a check box or a radio button. When an application changes the check state for a radio button, it may also need to change the check state of other radio buttons in the same group to ensure the mutually exclusive nature of radio buttons.

An application can determine a button's state by sending it a BM_GETCHECK or BM_GETSTATE message; the application can set a button's state by sending it a BM_SETCHECK or BM_SETSTATE message.