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

ShouldAppsUseDarkMode is incorrect on Win10 1903+ #3

Open henrypp opened 4 years ago

henrypp commented 4 years ago
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);
oltolm commented 1 year ago

ShouldAppsUseDarkMode works at least on 22H2 (19045.3324). I tested it myself.

Chaoses-Ib commented 7 months ago

On Windows 11 23H2 (22631.3085), ShouldAppUseDarkMode() always returns true regardless of what system mode and app mode are:

image

image

image

image

I guess someone in Windows really likes dark mode.