none
SetSysColors not fully working 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.

    For example, before my call to SetSysColors(), here is the regedit window as it normally appears:

    And after my call to SetSysColors(), it appears like this:

    As you can see, 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!

    Wednesday, August 23, 2017 3:04 PM

All replies

  • Hi sgb1975,

    thanks for posting here.

    >>As you can see, 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.

    After test, it does have this issue with SetSysColors. I have tried all the display elements but non of them works. In my opinion, it may related to the system theme in Win10.

    I suggest you connect to Microsoft and post this issue on it. Or click Help->Send Feedback->Report a Problem in your vs.

    Hope this could be help of you.

    Best Regards,
    Sera Yu


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Thursday, August 24, 2017 2:44 AM
  • Thank you for your help and verifying the behavior.  I've submitted a bug via the Connect site.

    Thursday, August 24, 2017 5:25 PM
  • Hi sgb1975,

    >>Thank you for your help and verifying the behavior.  I've submitted a bug via the Connect site.

    It will be better if you could send us your bug link so that we will track this and check the result.

    Best Regards,
    Sera Yu


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Thursday, September 7, 2017 6:17 AM
  • Hi 

    I am having the exact same issue as you are right now. I have moved to windows 10 and as I can see there is no classic theme on Windows 10 so the software I am working with is not looking correct and coming up with differences to how it looks on windows7 with the classic theme.

    Did you manage to find any resolution to this problem? I would really appreciate all the information you can provide me as I have not been able to find anything on the internet.

    Thanks

    K

    Wednesday, June 5, 2019 9:58 AM
  • Hi Please reply back with a response as soon as possible!

    Thank you

    Thursday, June 6, 2019 2:21 PM
  • Hello sgb1975

    I can see you have experienced the same issue as I am currently experiencing. It is pretty much the same scenario and I would really appreciate your help and response on what actions you had taken to get it resolved.

    Please contact me back. My email address is karan_122@hotmail.co.uk or just respond to this post please. 

    Kind Regards

    K

    Monday, July 15, 2019 3:53 PM