win32-darkmode
win32-darkmode copied to clipboard
ShouldAppsUseDarkMode is incorrect on Win10 1903+
fnShouldAppsUseDarkMode // 132
returned inncorrect result on Win10 1903+, you should call:
fnShouldSystemUseDarkMode // 138
ps: also for x64 builds right way for set properties of BOOL (INT) is:
SetPropW(hWnd, L"UseImmersiveDarkModeColors", (HANDLE)(LONG_PTR)dark);
ShouldAppsUseDarkMode
works at least on 22H2 (19045.3324). I tested it myself.
On Windows 11 23H2 (22631.3085), ShouldAppUseDarkMode()
always returns true regardless of what system mode and app mode are:
I guess someone in Windows really likes dark mode.