HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

SetHighContrastMode

Selects how the button control participates in the Windows High Contrast accessibility setting.

C

void SftButton_SetHighContrastMode(HWND hwndCtl, int mode);

C++

void CSftButton::SetHighContrastMode(int mode);

Parameters

hwndCtl

The window handle of the button control.

mode

One of the SFTBUTTON_HIGHCONTRAST_* constants.

SFTBUTTON_HIGHCONTRAST_AUTOFollow the Windows High Contrast setting. Default.
SFTBUTTON_HIGHCONTRAST_ONAlways render using the system palette regardless of the Windows setting.
SFTBUTTON_HIGHCONTRAST_OFFIgnore the Windows setting and render normally. Not recommended in shipping applications.

Comments

SetHighContrastMode selects whether the button uses the system palette (COLOR_WINDOW / COLOR_WINDOWTEXT / COLOR_HIGHLIGHT / etc.) or its application-chosen colors. The default is AUTO, which tracks the Windows High Contrast setting automatically.

SFTBUTTONN_HIGHCONTRAST_CHANGED is sent to the parent window each time the effective state flips in AUTO mode.

See Also GetHighContrastMode | IsHighContrastActive | SetDarkMode | High Contrast | Dark Mode | Notifications


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