Leito Posted August 9, 2019 Share Posted August 9, 2019 Any chance to see dark scrollbars in a future version as they seem more and more supported on Windows 10 (first File Explorer, then cmd line since 1903)? I found this: Quote After some digging, I was able to find these two approaches. Both are undocumented and may change without notice. 1 SetWindowTheme(hwnd, L"DarkMode_Explorer", NULL); 2 using TYPE_AllowDarkModeForWindow = bool (WINAPI *)(HWND a_HWND, bool a_Allow); static const TYPE_AllowDarkModeForWindow AllowDarkModeForWindow = (TYPE_AllowDarkModeForWindow)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(133)); AllowDarkModeForWindow(a_HWND, true); SetWindowTheme(hwnd, L"Explorer", NULL); WARNING: Ordinal 133 may have completely different API behind it on other versions of Windows, including newer/older Win10 builds. Both approaches apply some effects, but not everything. For example, TreeView gets dark scrollbars and dark background for selected item, but the rest of background stays default. Unfortunately, so far it's not like "call a function and that's it". It seems that even with correct theme applied, some background colors need to be handled manually. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.