Windows Visual Themes: Gallery of Parts and States?

Microsoft Windows lets programmers draw GUI elements using the look and feel of the current theme using functions like DrawThemeBackground and DrawThemeText. The elements are specified by Class, Part, and State, as described at the Parts and States page at MSDN.

Unfortunately, the page is not very informative (at all!). So the question is: is there somewhere a reference of all these parts and states, preferably with images of the elements (in the default Windows Vista/7 theme)?


Solution 1:

I have created a small Windows application, programmed with the table at Parts and States. This application lets the programmer browse and explore all parts and states, using the current OS theme.

Parts and States Explorer
(High-Res)

It can be downloaded at

  • https://privat.rejbrand.se/UxExplore.exe

The (Delphi, Win32 API) source, which is too long to be posted here (due to hundreds of constants) is found at

  • https://privat.rejbrand.se/UxExplore.zip
  • https://privat.rejbrand.se/UxExploreMain.html
  • https://privat.rejbrand.se/UxExploreConsts.html

Solution 2:

You're looking for this.

Screenshot

Solution 3:

Mike Lische, who wrote the first Theme support for Delphi (which was later absorbed by Borland) has a very good Theme Explorer demo application:

alt text

It's not been updated to support new Windows 7 common controls, but its parts/states explorer is very pretty.

And if i may say, Andreas, a design you might want to copy for yours :)