Fog Creek Software
Discussion Board

Windows XP Themes

Are these themes skins for Windows XP? Do they affect the appearance of other applications? I am developing a desktop application - should I code for handling themese or Win XP changes the appearance of my app depending on the theme?

Thursday, June 05, 2003

Windows XP changes even windows 3.1 apps... it's only the external stuff that changes, the menu bars sliding down, or the corners being rounded...

I could be wrong here, but that's been my end-user observation.
Thursday, June 05, 2003

Yeah, you have to code defensively. Don't assume anything about colors, pixels, fonts. For example, don't write things out in black text. The user might have a black background. Instead call GetSysColor and check what color to use.

Never make assumptions about how big something is (like the width in pixels of a scrollbar). There are functions like GetSysMetrics for this.

It's almost always a bad idea to try to reimplement menu bars, buttons, window controls, title bars, scroll bars, etc. yourself. Yours may fit in nicely with the default theme but stick out like a sore thumb with another theme.

For testing, try using the Windows Classic mode and choose the various high contrast appearance groups that come with Windows; these are designed for people with various vision problems. Your app should adapt to all the settings gracefully. Some users can't see the screen unless it's white-on-black, 18 point fonts.

Joel Spolsky
Thursday, June 05, 2003

You might need to watch those SystemMetrics (Title bar sizes, etc.), if you care about the non-client area of the window.

Thursday, June 05, 2003

Im with Joel, dont code for themes, leave this upto the
operating system. If you cater for skin, then someone themes their desktop, then you app will not be in the same theme. End result, the user has to change his themes in more than one place. How annoying.

Hope this helps.


James Ladd
Thursday, June 05, 2003

Users may change system colors, fonts, and element sizes - this is true for all versions of Windows, not just XP. However, the Windows XP visual styles are only applied to applications that explicitly support them.
XP includes two versions of the ComCtl32.dll library - one for backward compatibility and one that supports visual styles and themes. Because there are major interface differences between the two versions, applications must explicitly state their support for the latest version. This is done by including a manifest (as a resource or an external file) and - more importantly - through code.
There's some information on MSDN - see for details.

Yorai Aminov
Thursday, June 05, 2003

If you configure your application to use the new version of the common controls, internal controls will be themed too. You don't have to make any changes to your code unless you have hardcoded any metrics.

Roland Kaufmann
Thursday, June 05, 2003


Will you be fixing the superfluous horizontal scroll bar that appears in the CityDesk 2.x variables listview and the clipped browser preview button in the Publish dialogue? Both appear when using Windows XP with the new shell.

John Topley (
Thursday, June 05, 2003

Be aware themes do some odd stuff, particularly inside debuggers. I "bugged" some of this stuff during the XP beta process (see for some sample stuff I did) but then I'm not sure if I would call some of this bugs, more like "funnies". However ALWAYS use GetSysColor and the system metrics stuff. One of our telephone support guys here is mostly blind (he uses a two monitors, both 21" one in zoom mode, one normal) and both of those are set to high contrast.
I am somewhat ashamed of how well our current generation of windows product works for him and the next generation will do much better (Tool bar buttons etc often look rubbish).  Since we have a DOS version which talks to the same database he can often use that instead so life isn't too bad.

Peter Ibbotson
Thursday, June 05, 2003

Does anyone go so far as to test their UIs against visual style mods like StyleXP?

Joe Paradise
Thursday, June 05, 2003

*  Recent Topics

*  Fog Creek Home