ysc3839 / win32-darkmode

Example application shows how to use undocumented dark mode API introduced in Windows 10 1809.
MIT License
437 stars 48 forks source link

Oddity with messaging #21

Open sindizzy opened 1 year ago

sindizzy commented 1 year ago

First of all...great code. One thing I did want to point out is that when the form loses focus the theme goes back to normal. I only see a dark theme when I divert the focus to some other application.

Focus on another app image

Focus on the dark mode app image

btw, for the latest builds of win10 this should be updated:

constexpr bool CheckBuildNumber(DWORD buildNumber) { return (buildNumber == 17763 || // 1809 buildNumber == 18362 || // 1903 buildNumber == 18363 || // 1909 buildNumber == 19041 || // 2004 buildNumber == 19042 || // 2010 buildNumber == 19043 || // 21H1 buildNumber == 19044); // 21H2 }

netx123 commented 1 year ago

Regarding the change in color you are seeing when your app window has focus, I beleive this is by design and is actually an option in Windows,

Right click desktop and select "Personalize" -> "Colours"

In here you'll see an option for **Accent Colours" and "Show accent color on title bars and windows border", if this is enabled then the window that currently has the focus gets its title bar changed to whatever color you have selected here in the settings screen.

accentcolor

sindizzy commented 1 year ago

Ahhh gotcha