Visual Styles


The common controls that are included in Microsoft Windows XP and Windows Vista are based on the Microsoft Win32 common controls and user controls. This control set has a new functionality, referred to as visual styles. The appearance of controls can change based on the system appearance chosen by the user.


Note Visual Styles are not supported in 256-color mode, where controls might not be rendered correctly if the user does not have the appearance of Windows set to Windows Classic.


New run-time libraries—ComCtl32.dll version 6 and UxTheme.dll—are provided in Windows XP and later operating systems to enable visual styles. UxTheme.dll is used by the common controls to take advantage of system visual styles. ComCtl32.dll queries UxTheme.dll for appropriate dimensions and other pertinent information for a control, and calls UxTheme.dll to render the parts of a control or surface.


To be able to use visual styles, your application must be running on an operating system that contains ComCtl32.dll version 6. Windows XP and Windows Vista include both version 5 and version 6. By default, applications running under these operating systems use version 5 to maintain compatibility with earlier versions of the operating system. If you want your application to use ComCtl32.dll version 6, you must add an application manifest or compiler directive to specify that version 6 should be used if it is available. Version 6 includes some new controls and new options for other controls, but the biggest change is support for the Windows XP visual styles architecture. See Enabling Visual Styles for information on how to create application manifests.


For standard controls, no further action is necessary to ensure that the controls are displayed in the user's preferred visual style. For owner-drawn controls, an API is provided that enables you to retrieve information about the visual style and to draw items in that style.


Valid XHTML 1.0 Transitional