Click here to Skip to main content
Click here to Skip to main content

Add Windows XP Theme Style to your current projects

By , 6 Sep 2001
 

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"?> 
    <assembly 
       xmlns="urn:schemas-microsoft-com:asm.v1" 
       manifestVersion="1.0">
     <assemblyIdentity 
        processorArchitecture="x86" 
        version="5.1.0.0"
        type="win32"
        name="test.exe"/>
     <description>Test Application</description>
     <dependency>
      <dependentAssembly>
        <assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             publicKeyToken="6595b64144ccf1df"
             language="*"
             processorArchitecture="x86"/>
      </dependentAssembly>
     </dependency>
    </assembly>
    

    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.

License

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
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 1memberBartosz Wojcik10 May '10 - 10:21 
GeneralRe: My vote of 1memberMember 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.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.membersnarfblam24 Sep '09 - 15:58 
GeneralThanksmembercyper_12 Aug '09 - 1:52 
GeneralTheme not working in DllmemberMember 464702929 Jun '08 - 2:07 
GeneralRe: Theme not working in Dll [modified]memberSnakefoot24 Sep '09 - 9:30 
QuestionEmbed XP theme in an application without manifest [modified]memberbasawaraj15 May '08 - 20:39 
GeneralVS2005memberjosip cagalj12 Dec '07 - 3:30 
GeneralRe: VS2005memberbasawaraj15 May '08 - 20:43 
GeneralRe: VS2005memberMaou3 Jan '09 - 10:53 
QuestionWhat about controls in a DLL?memberRolling Justin9 Sep '07 - 2:27 
AnswerRe: What about controls in a DLL?membermy_love_d3 Jul '10 - 1:34 
GeneralIE Toolbarmemberansif_pi16 Jul '07 - 22:55 
GeneralRe: IE ToolbarmemberRafael.Franco17 Jul '07 - 2:08 
GeneralRe: IE Toolbarmembercanido2 Oct '07 - 4:29 
GeneralProblem with Button when using XP StylememberTobetheWinner20 Jun '07 - 2:04 
Generalno focus rectangle in buttonsmemberconxita15 Apr '07 - 8:06 
GeneralCan't change text color of check boxmemberPei25 Mar '07 - 22:06 
GeneralTips for VS 2005memberWarren Stevens21 Mar '07 - 6:47 
QuestionXp style problem in Visual Studio 2005memberVinod Moorkkan17 Feb '07 - 0:18 
AnswerRe: Xp style problem in Visual Studio 2005memberKarstenK19 Feb '07 - 3:23 
Generaleasier in VS2005memberc_srishti23 Dec '06 - 17:23 
GeneralRe: easier in VS2005memberMember 423139120 Apr '09 - 23:18 
GeneralTHANK YOU! THANK YOU! THANK YOU! THANK YOU!memberMaster_God12 Nov '06 - 8:31 
GeneralSuch aGOOD WORK!memberCoolboy12324 Sep '06 - 19:53 
GeneralVS2005memberJames Poag19 Jul '06 - 2:57 
GeneralRe: VS2005membersciencekrishnan22 Jul '09 - 1:43 
Generalx64 manifestmembergotomy4 Jun '06 - 13:39 
GeneralRe: x64 manifest [modified]membergotomy6 Jun '06 - 11:59 
QuestionApplication configuration is incorrectmemberKinnos30 Jan '06 - 5:49 
JokeRe: Application configuration is incorrectmemberFiberman14 Feb '06 - 20:43 
GeneralRe: [ThnakYou!!]Application configuration is incorrectmembereojun8125 Dec '06 - 5:39 
GeneralRe: Application configuration is incorrectmemberAnil K P20 Feb '07 - 4:04 
GeneralStrange behaviour when changing the editbox control colormemberyttham7 Jan '06 - 23:08 
GeneralRe: Strange behaviour when changing the editbox control colormemberyttham9 Jan '06 - 3:00 
QuestionAdd XP Theme Style to Visual C++.NETmemberC_W_S1 Dec '05 - 9:41 
AnswerI Would Like to Know As Wellmemberrayquan22 Mar '06 - 11:20 
AnswerRe: I Would Like to Know As Wellmemberbryan.yoo12 Jun '06 - 4:29 
GeneralRe: I Would Like to Know As WellmemberNeounk11 Aug '07 - 2:22 
GeneralVery nice!memberGeert Vancompernolle8 Oct '05 - 8:48 
QuestionHow to do this &quot;on the fly&quot;?memberdc_20005 Aug '05 - 23:03 
AnswerRe: How to do this &quot;on the fly&quot;?memberD0lph|n7 Sep '05 - 7:02 
GeneralStep #3memberdaDude29 Jan '05 - 12:53 
GeneralRe: Step #3memberdaDude29 Jan '05 - 12:55 
GeneralWindows XP theme on Windows 2ksussPseudoMechanic13 Sep '04 - 22:21 
GeneralRe: Windows XP theme on Windows 2kmemberOne Stone30 Jun '05 - 0:10 
GeneralProblem with checkboxes on tab pagesmemberPaul S. Vickery1 Sep '04 - 4:24 
GeneralRe: Problem with checkboxes on tab pagesmemberralfsch25 Jan '05 - 5:39 
GeneralRe: Problem with checkboxes on tab pagesmemberPaul S. Vickery25 Jan '05 - 22:37 

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 7 Sep 2001
Article Copyright 2001 by Jiang Hong
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid