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);
hwndCtl
The window handle of the button control.
mode
One of the SFTBUTTON_HIGHCONTRAST_* constants.
| SFTBUTTON_HIGHCONTRAST_AUTO | Follow the Windows High Contrast setting. Default. |
| SFTBUTTON_HIGHCONTRAST_ON | Always render using the system palette regardless of the Windows setting. |
| SFTBUTTON_HIGHCONTRAST_OFF | Ignore the Windows setting and render normally. Not recommended in shipping applications. |
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