Click here to Skip to main content
15,358,239 members
Articles / Programming Languages / C++
Posted 6 Sep 2001


132 bookmarked

Add Windows XP Theme Style to your current projects

Rate me:
Please Sign up or sign in to vote.
4.84/5 (65 votes)
6 Sep 2001
Add Windows XP Theme Style to your current projects

Sample Image - xptheme.jpg

The following steps introduces XP Theme Style to your project:

  1. Insert Resource, choose "Custom", input "24" (without quotes) as resource type
  2. Copy and paste the following XML sheets into the editor.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
     <description>Test Application</description>

    You can replace test.exe and Test Application with any string you like. This will not affect the behaviour of the application.

  3. Change resource ID to 1.
  4. Add calls to InitCommonControls() in your WinMain(). Don't forget to include commctrl.h and link comctl32.lib. Rebuild your project, all done :-)

This special resource type is only recognized by Windows XP. In any other version of Windows (Windows 9x/NT/2000), the program simply runs as before.

You can also create a manifest file with the same name of the EXE file, plus an extension .manifest, which contains the same lines as the ones above. For our test.exe, the manifest file is test.exe.manifest.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Jiang Hong
China China
No Biography provided

Comments and Discussions

GeneralMy vote of 1 Pin
Bartosz Wójcik10-May-10 10:21
MemberBartosz Wójcik10-May-10 10:21 
GeneralRe: My vote of 1 PinPopular
Member 37704910-May-10 18:34
MemberMember 37704910-May-10 18:34 
GeneralA simplest way to change all the controls in XP if you don't like the old scrollbars, tabcontrols, and so on. Pin
jc000112-Sep-09 13:06
Memberjc000112-Sep-09 13:06 
GeneralRe: A simplest way to change all the controls in XP if you don't like the old scrollbars, tabcontrols, and so on. Pin
snarfblam24-Sep-09 15:58
Membersnarfblam24-Sep-09 15:58 
GeneralThanks Pin
cyper_12-Aug-09 1:52
Membercyper_12-Aug-09 1:52 
GeneralTheme not working in Dll Pin
thomsontomy29-Jun-08 2:07
Memberthomsontomy29-Jun-08 2:07 
GeneralRe: Theme not working in Dll [modified] Pin
Rolf Kristensen24-Sep-09 9:30
MemberRolf Kristensen24-Sep-09 9:30 
QuestionEmbed XP theme in an application without manifest [modified] Pin
basawaraj15-May-08 20:39
Memberbasawaraj15-May-08 20:39 
GeneralVS2005 Pin
josip cagalj12-Dec-07 3:30
Memberjosip cagalj12-Dec-07 3:30 
GeneralRe: VS2005 Pin
basawaraj15-May-08 20:43
Memberbasawaraj15-May-08 20:43 
GeneralRe: VS2005 Pin
Maou3-Jan-09 10:53
MemberMaou3-Jan-09 10:53 
QuestionWhat about controls in a DLL? Pin
Rolling Justin9-Sep-07 2:27
MemberRolling Justin9-Sep-07 2:27 
AnswerRe: What about controls in a DLL? Pin
my_love_d3-Jul-10 1:34
Membermy_love_d3-Jul-10 1:34 
GeneralIE Toolbar Pin
ibrahim_8416-Jul-07 22:55
Memberibrahim_8416-Jul-07 22:55 
GeneralRe: IE Toolbar Pin
Rafael Franco17-Jul-07 2:08
MemberRafael Franco17-Jul-07 2:08 
GeneralRe: IE Toolbar Pin
canido2-Oct-07 4:29
Membercanido2-Oct-07 4:29 
GeneralProblem with Button when using XP Style Pin
TobetheWinner20-Jun-07 2:04
MemberTobetheWinner20-Jun-07 2:04 
GeneralRe: Problem with Button when using XP Style Pin
aawajaarughat25-Feb-14 22:27
professionalaawajaarughat25-Feb-14 22:27 
Generalno focus rectangle in buttons Pin
conxita15-Apr-07 8:06
Memberconxita15-Apr-07 8:06 
GeneralCan't change text color of check box Pin
Pei25-Mar-07 22:06
MemberPei25-Mar-07 22:06 
GeneralTips for VS 2005 Pin
Warren Stevens21-Mar-07 6:47
MemberWarren Stevens21-Mar-07 6:47 
QuestionXp style problem in Visual Studio 2005 Pin
Vinod Moorkkan17-Feb-07 0:18
MemberVinod Moorkkan17-Feb-07 0:18 
AnswerRe: Xp style problem in Visual Studio 2005 Pin
KarstenK19-Feb-07 3:23
mveKarstenK19-Feb-07 3:23 
Generaleasier in VS2005 Pin
c_srishti23-Dec-06 17:23
Memberc_srishti23-Dec-06 17:23 
GeneralRe: easier in VS2005 Pin
Member 423139120-Apr-09 23:18
MemberMember 423139120-Apr-09 23:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.