Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Using XP DrawThemeBackground et.all. Collapse All
Subject Author Date
Neville Franks Nov 6, 2003 - 2:17 AM

Hi, I want to use the WinXP DrawThemeBackground() function to draw a checkbox ie. BP_CHECKBOX. I have found that the paint manager has ptrs to the various theme api functions. How do I use m_pUxApi_DrawThemeBackground() etc. in my code. I’m sure this is simple.

Also how can I detect whether I can use theme api functions vs. the older non-XP drawing functions.

Technical Support Nov 8, 2003 - 8:50 AM

Dear Neville,

The g_PaintManager.m_bUxApiInitPassed member is intended to detect whether the theme API is available. The true value of this member means all g_PaintManager.m_pUxApi_*** function pointers but m_pUxApi_DrawThemeBackgroundEx have been initialized. The last one is only valid (not NULL) if the Windows component update for VisualStudio .NET 2003 has been installed.

The theme API (uxtheme.dll) is available in Windows XP when any theme is used but Windows Classic. When the Classic theme is on, Windows blocks the theme API and everything works like in earlier Windows versions.

When setting on the Classic theme, g_PaintManager.m_bUxApiInitPassed becomes false and Prof-UIS resets all the g_PaintManager.m_pUxApi_*** function pointers to NULL.