DevX Home    Premier Club    Search    Help    Locator+    Shop DevX    





 
Beyond Windows 95: Microsoft® Windows® XP Brings a New Visual Style to Windows Users

Choices, choices. Learn how to take advantage of the new visual style in Windows XP so your applications fit in and look the part.

The visual style of Microsoft Windows has been pretty much unchanged since Windows 95 was shipped. The gray 3D-chiseled dialog controls have been what everyone identifies as Windows. With the release of Windows XP, this will change. Windows XP will introduce a whole new visual style to Windows. In addition to the Desktop Themes that were first introduced in the Windows 95 Plus Pack, there will be the ability to change the overall visual style of the operating system. While the original desktop themes would change a user's color scheme, fonts and font sizes, and wallpaper settings, Windows XP Visual Styles change the way controls, window borders and menus are drawn. For example, since Windows 95, the options dialog for Outlook Express has looked like Figure 1.

 
Figure 1.
Windows XP will be able to show the dialog in exactly the same way. The "classic visual style" on Windows XP will offer the current Windows look to users who are most comfortable with this look. However, Windows XP will also be able to show the dialog box like Figure 2.

Notice the new dialog border. Gone is the gray, 3D look. The controls on the dialog also have a new appearance, notice that use of color on the close button in the upper right corner. What you can't see from these pictures is the new hot-spot behavior for the controls. This represents the current thinking for the default visual style for Windows XP.

 
Figure 2.
While the visual style for Windows XP can be very different than the current versions of Windows, the overall feel for working with the OS will be very familiar. Anyone using any version of Windows today will feel right at home using Windows XP. The menus and controls will be in the same place and will work the same way. In fact, it is this uniformity between the various versions of Windows that stops the visual styles on Windows XP from having a full "skin" capability. Skins usually allow the skin author to completely change the look and feel of the skinned component. In a skin, the controls can not only have a different look and feel, but can also have different locations or not be present at all. This level of change is not appropriate for the whole operating system, the way it is for components such as the Windows Media Player.

Technical Description
Windows XP is introducing "user experience themes and controls." Themes determine what visual style Windows XP will use to interact with the user. User experience controls are a new implementation of the Windows controls (buttons, list boxes, edit controls, etc.) and the common controls (listview, tab control, toolbar, tooltip, tree view, etc.) that use themes. The actual implementation is an interesting fork in the road for the structure of some of the user interface code in Windows. On one fork lies the way all previous 32-bit versions of Windows have been implemented. The original Windows controls are implemented in USER32.DLL, the common controls in COMCTL32.DLL, and the rendering of non-client areas of a window (like the border and menus) is done from USER32.DLL.

USER32.DLL is a core component of the operating system. It is the part of Windows that implements the windows, message system, etc. As such, it is very tied to a particular version of the OS. COMCTL32.DLL is now under Windows File Protection for Windows 2000 and Windows ME, so it can also only be changed with an OS update or service pack. For previous versions of Windows, COMCTL32.DLL actually shipped with many system components and applications, and it was often a cause of applications failing after another application or system component was installed. Windows XP has this fork intact. In fact, Windows XP will ship with the same COMCTL32.DLL as the most recent service pack for Windows 2000. The "classic visual style" is actually not a "visual style," but uses this original code fork and the controls from USER32.DLL and COMCTL32.DLL.

The other fork represents the future of operating system and component development for Windows. The new fork, the user experience visual styles and controls fork, is based on the side-by-side component sharing strategy. On this fork, there is a new DLL, UXTHEME.DLL, that understands visual styles. This new DLL does all the rendering for theme-aware controls, as well as the non-client areas for all windows. USER32.DLL now has new code that determines if an application should get its original controls from USER32.DLL, or it should get the new user experience controls instead.

COMCTL32.DLL now implements all the common controls and the controls that were originally implemented in USER32.DLL. The new COMCTL32.DLL calls the UXTHEME.DLL to do all the rendering of the controls in a theme-aware manner. This new architecture allows the user-interface designers to design and implement a new theme for Windows XP, or later versions of Windows, without requiring developers to change the underlying code. While Windows XP will ship with the professional and consumer themes (and the non-theme classic look), it is possible that additional themes may become available.

We mentioned that COMCTL32.DLL was often the cause of applications failing. Microsoft has always tried to make the minimal amount of changes to the DLL, in an attempt keep as many applications working as possible. Changing the whole look of the operating system and integrating a whole new component, UXTHEME.DLL, is hardly something that can be done with minimal change.

As a result, the new COMCTL32.DLL is expected to break a number of applications. This is not something that the Windows XP developers want to happen. To remove this issue, the new COMCTL32.DLL will only be available to applications that tell the operating system that the application has been tested and works with the new COMCTL32.DLL. The user-experience COMCTL32.DLL will not be installed in the SYSTEM32 directory. Instead, it will be installed as a managed assembly and access to the component will be via an application manifest. The new COMCTL32.DLL (version 6.0.0.0), and the old COMCTL32.DLL (version 5.81) will both ship with Windows XP and will be installed and run side by side with each other. For more information about side-by-side components and managed assemblies, see "Side By Side Component Sharing - Ending DLL Hell".

Aside from the new visual styles, another area of the new visual style that Windows XP will take advantage of is greatly enhanced icons. In the past, icons in Windows have been very simple images. For versions of Windows before Windows XP, applications should have supplied three versions of the icons: two 16-color icons, one 16x16 pixels and one 32x32 pixels, and one 256 color icon of 48x48 pixels. For Windows XP, applications should also provide icons at all these sizes and use 24-bits per pixel of color with an 8-bit mask for alpha blending. By taking advantage of this high color support and alpha blending, a much better, more realistic and more interesting icon can be created. A lot of the impact of the new visual style for Windows XP will be delivered with these new icons. Application developers should take advantage of this new feature of Windows XP to enhance the visual impact of their applications.




 

Sign up for our Windows XP email newsletter and we'll send you regular updates.

Microsoft Windows XP: What's in It for Developers?
What's New in the Shell
How to Write a
Windows XP Driver

Official Microsoft Windows XP Site
Overview of SOAP Client in Windows XP
Windows XP-Ready PCs from Compaq
Windows XP Home and Professional Editions: The SuperSite Review (by Paul Thurrott)
Windows XP FAQ (from ActiveWin)
CNET Windows XP Superguide
.NET Zone
Get Started With WinForms
C++ Zone