Using Theme Subclasses
Theme classes that represent controls such as ComboBox, Edit, ExplorerBar, Rebar, Tab, and Toolbar can be subclassed in order to provide theme variations for that particular control. For example, the Button class that Windows XP defines is subclassed as
Start::Button in order to provide control over the theme applied to the Start button.
Note Use caution when you create subclasses like those that are discussed in this topic. Because subclasses might be altered or unavailable in subsequent versions of Windows, you are discouraged from using them.
An application can use a subclassed theme in one of these two ways:
- It can use the OpenThemeData function with a string of the form
subclass::classin the pszClassList parameter.
- It can call SetWindowTheme with the theme subclass name in the pszSubAppName parameter.
Certain controls, such as Rebar and Toolbar, provide specific messages that you can send to instruct the control to use a theme subclass. For those controls, provide a pointer to a buffer that contains the theme subclass name in the lParam parameter of the message. Use the generic CCM_SETWINDOWTHEME message, or use a specific variant like those shown in the following table.
The following table lists some of the subclasses that Windows Vista defines.
In Windows Vista, the subclasses of certain classes internal to Windows Internet Explorer and Windows Explorer are available even though the classes themselves are not. The following table lists the available subclasses.
The following table shows the specifics of these classes.
|ADDRESSBAND||ABBACKGROUND||NORMAL (0x1), HOT (0x2), DISABLED (0x3), FOCUSED (0x4)|
|SEARCHBOX||SBBACKGROUND||NORMAL (0x1), HOT (0x2), DISABLED (0x3), FOCUSED (0x4)|
Build date: 10/27/2012