HeaderPane
Main
Hide

SftMask/DLL 7.0 - Masked Edit Control

Share Link
Print

SetHighContrastMode

Selects how the masked edit control honors the Windows High Contrast setting.

C

void SftMask_SetHighContrastMode(HWND hwndCtl, int mode);

C++

void CSftMask::SetHighContrastMode(int mode);

Parameters

hwndCtl

The window handle of the masked edit control.

mode

The high contrast setting. One of the following values:

SFTMASK_HIGHCONTRAST_OFFIgnore the Windows High Contrast setting and render normally. Not recommended in shipping applications.
SFTMASK_HIGHCONTRAST_ONAlways use the system palette, regardless of the Windows High Contrast setting.
SFTMASK_HIGHCONTRAST_AUTOFollow the Windows High Contrast setting. The control re-renders when the setting flips. This is the default.

Comments

While high contrast is active, system color values resolve to the user's high contrast palette, dark mode rendering is suppressed and Windows themes are suppressed - this covers the edit area, caption, popup calendar, popup calculator and autocomplete window. Custom RGB color values set by the application remain in effect. See High Contrast.

When the mode is SFTMASK_HIGHCONTRAST_AUTO, the control sends SFTMASKN_HIGHCONTRAST_CHANGED to its parent window each time the active state flips.

The high contrast setting can also be set through the nHighContrastMode field of the SFTMASK_CONTROL structure.

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


Last Updated 08/30/2026 - (email)
© 2026 Softel vdm, Inc.