在 C + Win API 中编程:如何让 Windows 7 查找控件? [英] Programming In C + Win API: How To Get Windows 7 Look For Controls?
问题描述
我严格使用 C 和 WinAPI 进行编程,没有使用 C++ 或 C#.我是初学者,刚刚学习绘制控件等.问题是,当我创建 Windows 或其他控件(如命令按钮)时,它们具有 Windows 本机外观.看看这个:
I am programming strictly in C and WinAPI, no C++ or C#. I am a beginner and just learning to draw controls etc. The thing is that when I create Windows or other controls like Command Buttons, they have Windows Native look. Take a look at this:
但在 Windows 7 中,命令按钮如下所示:
But in Windows 7, the command buttons look like this:
现在,我如何让我的程序中的命令按钮看起来像那样.甚至有可能吗?我正在关注本教程,以供参考:http://zetcode.com/gui/winapi/
Now, how do I get command buttons in my program to look like that. Is it even possible? I am following this tutorial, for reference: http://zetcode.com/gui/winapi/
谢谢.
推荐答案
您可以通过提供 XML 清单(作为单独的文件或嵌入的资源)来为您的应用启用视觉样式.有关详细信息,请参阅启用视觉样式.
You enable visual styles for your app by providing an XML manifest, either as a separate file or as an embedded resource. See Enabling Visual Styles for details.
这篇关于在 C + Win API 中编程:如何让 Windows 7 查找控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!