Author Topic: High Contrast mode  (Read 184 times)

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1043
  • ObjAsm Developer
    • ObjAsm
High Contrast mode
« on: August 31, 2022, 05:33:38 AM »
Hi
I learned from HSE that there is a Windows rendering mode called High Contrast which I don't think is well known and some applications that use owner-drawing are not prepared for it. At least that's what happened to me, but I've also seen that there are some glitches with so-called professional software such as Chrome.
Reading the documentation, I found that there were many changes in terms of look and themes that have been introduced with all the latest versions of Windows that have left a huge mess behind.

Here are some links that can be of interest:
https://docs.microsoft.com/en-us/windows/win32/w8cookbook/high-contrast-mode
https://docs.microsoft.com/en-us/windows/win32/controls/supporting-high-contrast-themes
https://docs.microsoft.com/en-us/windows/win32/controls/using-visual-styles

I checked all ObjAsm applications to react to the rendering mode change (on the fly) and check for the proper rendering mode calling the SystemParametersInfo API with the SPI_GETHIGHCONTRAST flag set.
Very importat seems to be the compatibility section in the manifest and to adhere to the few remaining colors of the GetSysColor API https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsyscolor (check the Windows 10 or greater remarks).

After a while programming in High Contrast mode, I get used to it  :cool:

Biterider