Question

I'm using the theme library to draw some text which works absolutely fine on Windows Vista - however, on Windows XP the returned HTHEME is NULL. This is the code I'm using:

HTHEME hTheme = ::OpenThemeData(pParent, L"TEXTSTYLE");

hTheme is valid on Vista, but NULL on Windows XP.
I've read the documentation for OpenThemeData and Parts and States on MSDN, but nothing mentions that TEXTSTYLE isn't supported on XP (even Google doesn't throw up any good suggestions).

Was it helpful?

Solution

The theme Luna (i.e. the Microsoft-made theme distributed with XP) defines only subset of classes and parts of Aero (Windows Vista and 7).

If you have access to machines with Windows XP and Vista (or 7) you may preview what's defined by Theme Explorer utility: http://sourceforge.net/projects/mctrl/files/theme-explorer/

OTHER TIPS

I presume that on XP you still have theming turned on? If you have turned off "bubblegum" mode - i.e. reverted to the classic look, then the Theming APIs all fail and youre expected to use the legacy APIs to draw the frame elements. DrawFrameControl etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top