realbasic-nug
[Top] [All Lists]

Re: Which WinXP Theme is in use?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Which WinXP Theme is in use?
From: Aaron Ballman <aaron at realsoftware dot com>
Date: Wed, 31 Aug 2005 12:10:21 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <9BDE5B1B-0A08-4E07-88DD-FB7DB2894E28 at stretchedout dot com>
Greg wrote:
Anybody know if there's a way to tell which theme Windows XP is in?

You can write declares against the uxtheme library to find out all sorts of great theme information.

I believe this is the one you're interested in using:


Sub GetCurrentThemeName(ByRef themeName as String, ByRef colorName as String, ByRef sizeName as String) Soft Declare Sub GetCurrentThemeName Lib "uxtheme" ( name as Ptr, nameSize as Integer, colorName as Ptr, colorSize as Integer, sizeName as Ptr, sizeSize as Integer )

if not System.IsFunctionAvailable( "GetCurrentThemeName", "uxtheme" ) then return

  dim name as new MemoryBlock( 2048 )
  dim colors as new MemoryBlock( 2048 )
  dim size as new MemoryBlock( 2048 )

GetCurrentThemeName( name, name.Size, colors, colors.Size, size, size.Size )

  themeName = name.WString( 0 )
  colorName = colors.WString( 0 )
  sizeName = size.WString( 0 )
End Sub

HTH!

~Aaron
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>