HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

Components

A SftButton control is composed of a fixed set of rendering layers drawn in a predictable order. Understanding the layer stack makes it easier to choose which fields on SFTBUTTON_CONTROL to set for a given visual effect.

Layer stack, outside in

  • Border - one of three styles (thin, standard, single-pixel). See Borders.
  • Background - solid color, or a two-color gradient. Separate normal / hover / pressed / focus background colors are available. See Colors and Gradients.
  • Background pictures (PictureBG / PictureBGHover / PictureBGPressed / PictureBGDisabled) - drawn over the background fill, under the foreground layers.
  • Foreground image layer 1 (Picture1 and its per-state variants) - the primary image.
  • Foreground image layer 2 (Picture2 and its per-state variants) - the secondary image, drawn over layer 1.
  • Text - rendered from SFT_TEXT in the current state's text color and font. See Text and Fonts.
  • Focus ring - drawn on top when the button has keyboard focus.
  • Dropdown arrow (if fShowDropDown is TRUE) - drawn in a sidebar at the right edge of the button. See Dropdown Button.

When theme is active

When nUseThemes is SFTBUTTON_THEME_YES, Windows paints the border and background; the control draws images and text on top. nUseThemes SFTBUTTON_THEME_YES_NOTEXT is a hybrid - Windows paints the border and background but the control paints the text in the caller-supplied color and font.

When dark mode or high contrast is active

Theme-driven chrome is suppressed. The control falls back to its built-in GDI render path and uses a dark palette (dark mode) or system colors (high contrast). See Dark Mode and High Contrast.


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