SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Button text is rendered from a single SFT_TEXT field on SFTBUTTON_CONTROL - Text. Per-state appearance comes from the per-state foreground colors on SFTBUTTON_CONTROL itself: colorFg (normal and hover), colorFgPressed (pressed) and colorFgGrayed (disabled).
SFT_TEXT holds the text value as a null-terminated string. Ampersands (&) in the text specify the accelerator key - pressing Alt+the-letter-after-ampersand invokes the button, and the letter is underlined in the rendered text. Use two ampersands (&&) to render a literal ampersand.
Text color is picked per state from the SFTBUTTON_CONTROL color fields. SFT_TEXT.colorFg can override the per-state color when set; leave it at SFT_NOCOLOR to use the per-state color from SFTBUTTON_CONTROL. If both are SFTBUTTON_NOCOLOR, the control falls back to the system default (COLOR_BTNTEXT) or, in dark mode / high contrast, the appropriate palette color.
If the SFT_TEXT.hFont is NULL, the control renders text in the font attached to the button's HWND (set with WM_SETFONT). This is the normal Windows convention - setting the dialog's font once through WM_SETFONT propagates to all SftButton controls in the dialog.
When using a caller-supplied font, the font is not automatically scaled on DPI changes - the application is responsible for sending WM_SETFONT with a font sized for the new DPI when SFTBUTTONN_DPI_CHANGED fires. See Per-Monitor DPI and Scaling.
SFT_TEXT carries horizontal and vertical alignment fields (align and valign, plus a flag field that accepts standard DT_* drawing flags). Horizontal options are left, right, and center; vertical options are top, bottom, and center. Multi-line text uses the same alignment for every line.
When themes are active (nUseThemes is SFTBUTTON_THEME_YES), Windows chooses the text color; caller-supplied colorFg is ignored. To keep theme-drawn border and background but override the text color and font, use nUseThemes SFTBUTTON_THEME_YES_NOTEXT instead. Themes are automatically suppressed when dark mode or high contrast is active. See Using Themes, Dark Mode and High Contrast.
QueryChar tests whether a given character would activate the button as its access key. Use it from a custom keyboard-accelerator dispatcher to find the SftButton that should receive a given Alt-key combination.
