HeaderPane
Main
Hide
Share Link
Print

High Contrast

Windows High Contrast is an accessibility setting, not a visual preference. Users who enable it have committed to a specific high-contrast color scheme for everything on screen, and Microsoft's accessibility guidelines require applications to let the user's scheme win over any application-chosen colors. SftMask/OCX 8.0 follows the Windows setting automatically, and unlike most of the control's settings it does so without the application opting in - HighContrastMode defaults to highContrastSftMaskAuto.

When Windows High Contrast is active, the masked edit control:

  • resolves all system color values (which are the defaults of the control's color properties) to the user's high contrast palette - this covers the edit area, caption, popup calendar, popup calculator and autocomplete window,
  • suppresses dark mode rendering - high contrast takes precedence over dark mode,
  • suppresses Windows themes. The control draws its frame and buttons itself, using the system colors directly.

Explicit RGB color values assigned to the control's color properties remain in effect - the control does not override application-chosen explicit colors. Applications should avoid hard-coding colors on controls that must respect the user's contrast theme, or switch to system color values while the HighContrastActive property reports that high contrast is active.

The HighContrastMode property has three values (see SftMaskHighContrastConstants):

ValueDescription
highContrastSftMaskAuto (default)Follow the Windows High Contrast setting. The control re-renders when the setting flips.
highContrastSftMaskOnAlways use the system palette, regardless of the Windows High Contrast setting. Useful for testing, or for applications that want consistent high-contrast rendering for a specific control.
highContrastSftMaskOffIgnore the Windows High Contrast setting and render normally. Not recommended in shipping applications - it means users with accessibility needs will see rendering that does not comply with their contrast theme. Appropriate only where the application already paints its own high-contrast-aware chrome and inspects HighContrastActive itself.

The HighContrastChange event is fired each time the active state flips (highContrastSftMaskAuto only) so the application can repaint its own chrome to match. The HighContrastActive property reports the current state at any time.

Dark mode and Windows High Contrast are independent. If the user has both enabled, high contrast takes precedence - the contrast theme's palette wins over the dark palette, because honoring the user's contrast theme is the stronger accessibility requirement. See Dark Mode.


Last Updated 11/15/2026 - (email)
© 2026 Softel vdm, Inc.