本文介绍了暗模式API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! Microsoft是否计划记录并支持最近添加到Windows 10的暗模式主题API?Does Microsoft plan to document and support the dark mode theming APIs recently added to Windows 10? ie DwmSetWindowAttribute, DWMWINDOWATTRIBUTE为0x13。DwmSetWindowAttribute with a DWMWINDOWATTRIBUTE of 0x13. uxtheme.dll的AllowDarkModeForApp (序号135)和AllowDarkModeForWindow(序号133)。 功能区属性 UI_PKEY_DarkModeRibbon和 ; UI_PKEY_ApplicationButtonColor。推荐答案嗨splidge, 我不确定是什么微软的计划。但是,你可以使用它如下:Hi splidge,I'm not sure what's the plan of Microsoft. But, You could use it as the following: 1。SetWindowTheme(hwnd, L"DarkMode_Explorer", NULL); 2。2.using TYPE_AllowDarkModeForWindow = bool (WINAPI *)(HWND a_HWND, bool a_Allow); static const TYPE_AllowDarkModeForWindow AllowDarkModeForWindow =(TYPE_AllowDarkModeForWindow)GetProcAddress(hUxtheme,MAKEINTRESOURCEA(133));static const TYPE_AllowDarkModeForWindow AllowDarkModeForWindow = (TYPE_AllowDarkModeForWindow)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(133)); AllowDarkModeForWindow(a_HWND,true);AllowDarkModeForWindow(a_HWND, true); SetWindowTheme(hwnd,L" Explorer",NULL);SetWindowTheme(hwnd, L"Explorer", NULL); 最好的问候, DrakeDrake 这篇关于暗模式API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!