What are the possible classes for the OpenThemeData function?

前端 未结 5 1174
鱼传尺愫
鱼传尺愫 2021-02-07 13:33

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

5条回答
  •  礼貌的吻别
    2021-02-07 14:09

    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.

    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.

提交回复
热议问题