none
How to work SetSysColors in Windows 10? RRS feed

  • Question

  • Hello (was told by MS to try my post in this forum) - We have a legacy MFC application, written in C++, that is used primarily in vehicles and has a day/night mode.  When the user switches to "Night" mode, we make a call to SetSysColors() to change the colors of various Window elements (titlebar, background, menubar, etc), so that the colors are easier on the eyes in low-light conditions.  In Windows 10 (and possibly Win7), this no longer works like it used to.  SetSysColors will change colors of some of the elements, but not all of them.  The titlebar and menubar background, for example, are not affected.  Did something change along the way that causes these elements to not change color?  If so, how is the easiest and/or best way to programmatically change these elements for all open windows?  We do not need to restrict the color changes to just our application...we need to adjust the colors system-wide.  And the changes don't need to persist from one restart to the next.

    Some elements have changed, but the Title Bar ("Registry Editor"), and Menu Bar ("File Edit View" etc), and others were not affected by the system color change.  This worked in previous versions of Windows but not Windows 10 anymore.  We just need to have it work the way it used to.  This is now a major issue for several of our customers.  Any help is appreciated...Thanks!

    Thursday, June 13, 2019 3:18 PM

All replies