-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Code here needs to be modified for Windows 10 1903+:
Line 4943 in ee2edc8
| if (!(hc.dwFlags & HCF_HIGHCONTRASTON) && pShouldAppsUseDarkMode()) { |
ShouldAppsUseDarkMode should be replaced by ShouldSystemUseDarkMode at ordinal 138, according to issue here. I've confirmed that.
Also, this constant should be alerted:
Line 4948 in ee2edc8
| #define DWMWA_USE_IMMERSIVE_DARK_MODE 19 |
According to pull request here, (I had decompiled the dll provided by the DWM team, and found that) DWMWA_USE_IMMERSIVE_DARK_MODE maybe 20 on newer systems, and we should try to set both(19 and 20) to TRUE to ensure. As for the order, the DWM team choose to try 20 at first.
Also, for dark title bar and menus, we should call function at ordinal 135(AllowDarkModeForApp(TRUE) in 1809 or SetPreferredAppMode(AllowDark) in 1903) and FlushMenuThemes() at ordinal 136. The declaration of these functions could be found here.