The button control responds to this message by displaying it in the appropriate state and returning the old state.

If the button control has the style of BS_CHECKBOX, BS_AUTOCHECKBOX, BS_RADIOBUTTON, or BS_AUTORADIOBUTTON, it is displayed in the checked state if uscheck is set to 1, or in the unchecked state if it is set to 0 and usoldstate is set as appropriate.

If the button control has the style of BS_RADIOBUTTON or BS_AUTORADIOBUTTON, the WS_TABSTOP style is modified. If the resulting state of the button is checked, the WS_TABSTOP style is set, otherwise it is reset.

If the button control has the style of BS_3STATE or BS_AUTO3STATE, it is displayed in the unchecked state if uscheck is set to 0, in the checked state if it is set to 1, and in the indeterminate state if it is set to 2 and usoldstate is set as appropriate.

If the button control has the style of BS_USERBUTTON, a WM_CONTROL (in Button Controls) message is sent to its owner with usnotifycode set to BN_PAINT and usoldstate is set as appropriate.

If the button control has any other style, the button control takes no action other than to set usoldstate to 0.


[Back] [Next]