SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines whether the tab control honors the Windows High Contrast accessibility setting.
C
void WINAPI SftTabs_SetHighContrastMode(HWND hwndCtl, int mode); int WINAPI SftTabs_GetHighContrastMode(HWND hwndCtl); BOOL WINAPI SftTabs_IsHighContrastActive(HWND hwndCtl);
C++
void CSftTabs::SetHighContrastMode(int mode); int CSftTabs::GetHighContrastMode() const; BOOL CSftTabs::IsHighContrastActive() const;
hwndCtl
The window handle of the tab control.
mode
Defines the high contrast mode setting. mode can be one of the following values:
| SFTTABS_HIGHCONTRAST_OFF | The tab control ignores the Windows High Contrast setting and renders normally, using the tab control's configured colors and themes. |
| SFTTABS_HIGHCONTRAST_ON | The tab control always renders using the Windows system color palette (COLOR_WINDOW, COLOR_WINDOWTEXT, COLOR_HIGHLIGHT, etc.) as if Windows High Contrast were active. |
| SFTTABS_HIGHCONTRAST_AUTO | The tab control follows the current Windows High Contrast accessibility setting and switches automatically when the user changes it. This is the default. |
GetHighContrastMode returns a value indicating the current high contrast mode setting (SFTTABS_HIGHCONTRAST_OFF, SFTTABS_HIGHCONTRAST_ON or SFTTABS_HIGHCONTRAST_AUTO).
IsHighContrastActive returns TRUE if high contrast rendering is currently in effect on the tab control, otherwise FALSE. When mode is SFTTABS_HIGHCONTRAST_AUTO, the return value reflects the current Windows accessibility setting.
The SetHighContrastMode, GetHighContrastMode and IsHighContrastActive functions define and retrieve a tab control's high contrast mode setting. The default is SFTTABS_HIGHCONTRAST_AUTO so accessibility compliance is automatic; applications can opt out with SFTTABS_HIGHCONTRAST_OFF when a fully custom visual design is required.
When high contrast rendering is active, caller-supplied color overrides set with SetCtlColors and per-tab colors are ignored on the default render path. The control instead uses the matching Windows system color (COLOR_WINDOW for backgrounds, COLOR_WINDOWTEXT for text, COLOR_HIGHLIGHT / COLOR_HIGHLIGHTTEXT for the active tab, etc.), complying with Microsoft's High Contrast guidance that the user's chosen contrast theme must not be overridden by the application.
Windows themes are also suppressed in high contrast mode so the control falls back to the non-themed GDI path that honors system colors.
When mode is SFTTABS_HIGHCONTRAST_AUTO, the tab control tracks WM_SETTINGCHANGE / SPI_SETHIGHCONTRAST notifications from Windows and re-renders automatically when the user toggles the accessibility setting. A SFTTABSN_HIGHCONTRAST_CHANGED notification is sent to the parent window each time the active state flips so the application can repaint other UI to match.
Owner-drawn tabs (SFTTABS_DRAWTABPROC) are responsible for their own high contrast compliance. The strict color remap described above applies only to the default render path; owner-draw code should query IsHighContrastActive and re-map its role colors to system-palette values when the return value is TRUE.
See Also C/C++ API | C++ Classes | Notifications
