HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

Toggle (Check Box) Behavior

A SftButton with fToggle set to TRUE acts as a two-state button: each click flips the button between pressed and not-pressed, rather than returning to normal when the mouse button is released. The current state is held in the fPressed field.

Visual feedback

In the pressed state, the button renders using its Pressed-state images (Picture1Pressed, Picture2Pressed, PictureBGPressed), the colorBgPressed background color and the colorFgPressed text color. Unlike a momentary press, the Pressed visual stays on the button until the user clicks again.

Programmatic control

The application can query and set the toggle state by calling SftButton_GetControlInfo / SftButton_SetControlInfo and reading / writing fPressed. SftButton_DoClick synthesizes a click and flips the state.

Groups

SftButton does not implement intrinsic radio-button groups. Applications that want single-select radio behavior across multiple toggle buttons handle BN_CLICKED on each button and reset the other buttons' fPressed to FALSE through SftButton_SetControlInfo.

Accessibility

When fToggle is TRUE, the UIA Toggle pattern is exposed to screen readers. The pressed state is announced as "pressed" / "not pressed". See Accessibility (Screen Readers).


Last Updated 04/25/2026 - (email)
© 2026 Softel vdm, Inc.