win32-darkmode icon indicating copy to clipboard operation
win32-darkmode copied to clipboard

What would cause AllowDarkModeForWindow to return false?

Open ga2k opened this issue 4 years ago • 1 comments

I'm trying to implement this in a wxWidgets app. I call InitDarkMode() and g_darkModeSupported gets set to true, and the main menus are dark (nice!) and so are the scrollbars.

However, creating a window then calling AllowDarkModeForWindow() with the HWND of the window (or a control, doesn't matter) returns false, and window is not dark.

Any clues? I'm on Windows 10 Pro Version 20H2 OS Build 19042.508 (and yes, I've modified my version of CheckBuildNumber() to be >= 19041 instead of == 19041...)

ga2k avatar Sep 17 '20 02:09 ga2k

In 19041, the AllowDarkModeForWindow returns last state of dark mode: image

What's the class name of that window?

ysc3839 avatar Sep 17 '20 03:09 ysc3839