Windows Theme colors

Windows specific questions.
Post Reply
gedumer
Posts: 129
Joined: Sep 15, 2005 16:52

Windows Theme colors

Post by gedumer »

Can someone please tell me how to get the windows xp theme colors from a FB program?
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Post by dkl »

Well, the Windows API has GetSysColor(), which will get the system colors as set by the theme, MSDN documentation:
and the uxtheme lib (responsible for theme things) also has functions to directly query information about a theme, for example here:
and the others in that section... I've only got experience with GetSysColor though.

[those urls with parenthesis are evil]
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

Yeah, they're pretty evil...
One possible workaround is to use the %xx notation on them. The () brackets are %28 and %29.

The MSDN urls tend to work without the parentheses anyway though:
http://msdn.microsoft.com/en-us/library/ms724371
http://msdn.microsoft.com/en-us/library/bb773397
gedumer
Posts: 129
Joined: Sep 15, 2005 16:52

Post by gedumer »

Thanks to you both. The links were invaluable. The 1st certainly gets the stock system colors, while the 2nd is great for obtaining theme values.

Thanks again.
Post Reply