What are the possible classes for the OpenThemeData function?(OpenThemeData 函数有哪些可能的类?)
问题描述
我正在尝试调用 OpenThemeData(请参阅 msdn OpenThemeData) 函数,但我无法确定 pszClassList
参数传入的可接受的类名称是什么.
I'm trying to call the OpenThemeData (see msdn OpenThemeData) function but I couldn't determine what are the acceptable Class names to be passed in by the pszClassList
parameter.
HTHEME OpenThemeData(
HWND hwnd,
LPCWSTR pszClassList
);
谁能告诉我可以传递给该参数的可接受的类名是什么?谢谢!
Could anybody tell me what are the acceptable class names that I can pass into that parameter? Thanks!
推荐答案
您可以查看AeroStyle.xml",如之前的海报所述,它提供了 Vista/Aero 的确切列表.但是,如果您想安全起见(并且您可能会这样做),类名通常应该是 Windows 通用控件的 Windows 类名.例如,按钮和复选框使用类名Button",编辑控件Edit"等.我通常选择最接近我正在处理的任何自定义元素的控件的类名,并使用主题数据.这样,您将获得适用于 XP、Vista 和(希望如此)Windows 7 的代码,而不管用户选择的主题实际上是什么.
You can look in "AeroStyle.xml" as a previous poster noted, which gives an exact list for Vista/Aero. However, if you want to play safe (and you probably do) the class names should, in general, be Windows class names of Windows common controls. For example, push buttons and check boxes use the class name "Button", the edit control "Edit", etc. I generally pick the class name of the control that's closest to whatever custom element I'm working on is, and use the theme data for that. That way you'll get code that works with XP, Vista and (hopefully) Windows 7, regardless of what the user's selected theme actually is.
但是,除非您经常使用原始 Win32,否则您可能不会直接使用类名创建太多控件.类名在整个 MSDN 中相当随意地散布.一个好的起点通常是 Platform SDK 中的CommCtrl.h"文件,其中有很多,而且它们总是在 MSDN 帮助中对各个常用控件进行描述.您还可以经常通过在文本编辑器中打开 .rc 文件来查看对话框是如何定义的:这些包含控件的类名.
However, unless you use raw Win32 a lot, you probably don't do much control creation directly using the class name. The class names are rather liberally sprinkled throughout MSDN. A good place to start is usually the "CommCtrl.h" file from the Platform SDK, which has a lot of them, and they're always described in the MSDN help on the individual common controls. You can also often learn them by looking at how dialogs are defined in .rc files by opening them in a text editor: these contain the class name for the controls.
这篇关于OpenThemeData 函数有哪些可能的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:OpenThemeData 函数有哪些可能的类?


基础教程推荐
- 从 std::cin 读取密码 2021-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 使用从字符串中提取的参数调用函数 2022-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01