Matthijs de Smedt wrote:
Chris Cioffi wrote:
Hello all,
So I'm, right now, on XP with themes enabled. I can recursively reset the background to the correct color, but I'd like to be able to detect programmatically when this will be needed.
I can detect XP just fine, how to I check to see if theme's are enabled? Thanks!Chris
PS: Loving wxPython even more after 2 weeks of working with it!
You're looking for:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManagerThemeActive is set to 1 for a theme, 0 for the old windows style.
You might also want to look around in:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemesReally, this took only 2 clicks and a google search.
I don't think that this will quite do it since the themes can be enabled or disabled on a per application basis. If an .exe has a .manifest file or the proper stuff in its resource file then it can use themes if they are enabled for the system. If not then it won't use themes even if they are enabled for the system.
IIRC if an app is theme-enabled then it always will be using the newest version (6.0) of the ComCtl32 DLL, otherwise version 5.x will be used. So maybe this is a better test:
if 'wxMSW' in wx.PlatformInfo and wx.App.GetComCtl32Version() > 600:
print "XP theme-enabled"
else:
print "not using XP themes"
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!