Use Visual Styles from XP in the own application

To benefit from the new look and feel (Visual Styles) for the Windows XP
environment, you must include a Manifest in your application.
(Either as resource or as file in the same directory where your application

The manifest is a XML document. It will allow Windows XP to decide which
version of the comctl32.dll to use when binding.
The XML document contains information about the application you are
writing as well as information concerning the version of the comctl32.dll to use.

The following instruction shows how to
* create the manifest document
* create the XP resource file
* include the file in your application

The steps 1-4 show how to create the files.
You can also download the manifest and resource file from the


Copy this sample manifest and paste it into notepad or any text editor. }

Your Application Description


To customize to fit your application, replace “name” from assemblyIdentity and the
“description” string with your own data. Then save the file as WinXP.manifest }

Create another file which contains instructions to include the
WinXP.manifest (XML) document.
The contents of the WinXP.rc looks like this:}

1 24 “WinXP.manifest”


Now we need to use Delphi’s resource compiler (brcc32.exe) to compile the WinXP.rc file.
Doing so will result in a WinXP.res
From the command line, type the following:}

brcc32 WinXP.rc

Now include the resource in your application.
Include the following compiler directive:
immediately after {$R *.DFM}:*)

{$R WinXP.res}

Compile your application and run it!}

Test it if it runs correctly.
Note that some controls don’t adapt the new XP design such
as TGroupBox, TSpeedButton and some others.