在MFC应用程序中预览窗口主题更改 [英] Previewing Window theme changes in MFC application

查看:274
本文介绍了在MFC应用程序中预览窗口主题更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆