在MFC应用程序中预览窗口主题更改 [英] Previewing Window theme changes in MFC application
问题描述
我有64位MFC应用程序,我需要更改应用程序的主题(例如Aero / High Contrast黑暗主题等)?如何从"C:\ Windows \Resources \Ease of Access Themes"加载主题数据文件。并使用它们只预览特定的
窗口或控件?我已经尝试过SetWindowTheme()API [无效果],:: _ tsystem()API [无需预览即可应用于整个系统]
谢谢
嗨MarigoldR,
谢谢你在这里发帖。
>>我有一个64位MFC应用程序,我需要更改应用程序的主题(例如Aero /高对比度黑暗主题等)?如何从"C:\ Windows \Resources \Ease of Access Themes"加载主题数据文件。并使用它们只需
预览特定窗口或控件?我尝试过SetWindowTheme()API [没有效果],:: _ tsystem()API [无需预览即可应用于整个系统]
<我已经测试了SetWindowTheme函数,发现它无法改变MFC应用程序的主题。不确定是SetWindowTheme的问题还是我做错了。
如果你想改变MFC应用程序的主题,我建议你参考到这个
post ,也许它可以帮到你。
祝福,
Jack Zhang
Hi,
I have a 64 bit MFC application and I need to change the theme of the application (eg Aero/ High Contrast dark theme etc)? How do I load the theme data files from "C:\Windows\Resources\Ease of Access Themes" and use them to only preview a specific window or a control? I have tried SetWindowTheme() API [no effect], ::_tsystem() API [gets applied to the whole system without a preview]
Thanks
Hi MarigoldR,
Thanks for posting here.
>>I have a 64 bit MFC application and I need to change the theme of the application (eg Aero/ High Contrast dark theme etc)? How do I load the theme data files from "C:\Windows\Resources\Ease of Access Themes" and use them to only preview a specific window or a control? I have tried SetWindowTheme() API [no effect], ::_tsystem() API [gets applied to the whole system without a preview]
I have tested SetWindowTheme function and found that it can't change the theme of MFC application. Not sure it's the SetWindowTheme's problem or maybe I had done something wrong.
If you want to change the theme of MFC application, I suggest you refer to this post, maybe it can help you.
Best Wishes,
Jack Zhang
这篇关于在MFC应用程序中预览窗口主题更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!