OpenThemeData函数的可能类是什么? [英] What are the possible classes for the OpenThemeData function?

查看:593
本文介绍了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类名。例如,按钮和复选框使用类名称按钮,编辑控件编辑等。我通常选择最接近我正在处理的任何自定义元素的控件的类名称,并使用主题数据。这样,无论用户选择的主题是什么,您都将获得适用于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函数的可能类是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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