如何更改 Win32 API 应用程序中的控件主题?

发布于 2024-09-15 02:48:29 字数 129 浏览 4 评论 0原文

如果我在 Win32 API 中创建一个按钮,则默认控制主题看起来像 Windows 95/98 按钮。我记得过去微软论坛告诉我如何获得XP风格,但我不记得如何做到这一点。有没有办法以编程方式或手动更改 Win32 应用程序中的控件主题?谢谢。

If I create a button in the Win32 API, the default conrol theme looks like a Windows 95/98 button. I remember in the past the Microsoft forums told me how to get the XP style, but I don't recall how to do this. Is there a way to programatically or manually change the control themes in a Win32 application? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

或十年 2024-09-22 02:48:30

您想要通过添加清单来启用视觉样式对应用程序清单中的公共控件 6 程序集的依赖性。

如果您使用 DevStudio,它应该像从链接页面添加 #pragma 指令一样简单:

#pragma comment(linker,"\"/manifestdependency:type='win32'        
                name='Microsoft.Windows.Common-Controls'
                version='6.0.0.0' processorArchitecture='*'
                publicKeyToken='6595b64144ccf1df' language='*'\"")

You want to Enable Visual Styles by adding a manifest dependency to the common control 6 assembly to your applications manifest.

If you use DevStudio it should be as simple as adding the #pragma directive from the linked page:

#pragma comment(linker,"\"/manifestdependency:type='win32'        
                name='Microsoft.Windows.Common-Controls'
                version='6.0.0.0' processorArchitecture='*'
                publicKeyToken='6595b64144ccf1df' language='*'\"")
岁月打碎记忆 2024-09-22 02:48:30

SetWindowTheme Function 似乎是解决方案。华泰

SetWindowTheme Function would appear to be the solution. HTH

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文