Click here to Skip to main content
11,483,003 members (72,565 online)
Click here to Skip to main content

Add Windows XP Theme Style to your current projects

, 6 Sep 2001 504.1K 3.4K 129
Rate this:
Please Sign up or sign in to vote.
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"?> 
    <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 Smile | :)

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

Share

About the Author

Jiang Hong

China China
No Biography provided

Comments and Discussions

 
GeneralRe: VS2005 Pin
Maou3-Jan-09 11:53
memberMaou3-Jan-09 11:53 
QuestionWhat about controls in a DLL? Pin
Rolling Justin9-Sep-07 3:27
memberRolling Justin9-Sep-07 3:27 
AnswerRe: What about controls in a DLL? Pin
my_love_d3-Jul-10 2:34
membermy_love_d3-Jul-10 2:34 
GeneralIE Toolbar Pin
ansif_pi16-Jul-07 23:55
memberansif_pi16-Jul-07 23:55 
GeneralRe: IE Toolbar Pin
Rafael.Franco17-Jul-07 3:08
memberRafael.Franco17-Jul-07 3:08 
GeneralRe: IE Toolbar Pin
canido2-Oct-07 5:29
membercanido2-Oct-07 5:29 
GeneralProblem with Button when using XP Style Pin
TobetheWinner20-Jun-07 3:04
memberTobetheWinner20-Jun-07 3:04 
GeneralRe: Problem with Button when using XP Style Pin
aawajaarughat25-Feb-14 23:27
memberaawajaarughat25-Feb-14 23:27 
Generalno focus rectangle in buttons Pin
conxita15-Apr-07 9:06
memberconxita15-Apr-07 9:06 
GeneralCan't change text color of check box Pin
Pei25-Mar-07 23:06
memberPei25-Mar-07 23:06 
GeneralTips for VS 2005 Pin
Warren Stevens21-Mar-07 7:47
memberWarren Stevens21-Mar-07 7:47 
QuestionXp style problem in Visual Studio 2005 Pin
Vinod Moorkkan17-Feb-07 1:18
memberVinod Moorkkan17-Feb-07 1:18 
AnswerRe: Xp style problem in Visual Studio 2005 Pin
KarstenK19-Feb-07 4:23
memberKarstenK19-Feb-07 4:23 
Generaleasier in VS2005 Pin
c_srishti23-Dec-06 18:23
memberc_srishti23-Dec-06 18:23 
GeneralRe: easier in VS2005 Pin
Member 423139121-Apr-09 0:18
memberMember 423139121-Apr-09 0:18 
GeneralTHANK YOU! THANK YOU! THANK YOU! THANK YOU! Pin
Master_God12-Nov-06 9:31
memberMaster_God12-Nov-06 9:31 
GeneralSuch aGOOD WORK! Pin
Coolboy12324-Sep-06 20:53
memberCoolboy12324-Sep-06 20:53 
GeneralVS2005 Pin
James Poag19-Jul-06 3:57
memberJames Poag19-Jul-06 3:57 
GeneralRe: VS2005 Pin
sciencekrishnan22-Jul-09 2:43
membersciencekrishnan22-Jul-09 2:43 
Generalx64 manifest Pin
gotomy4-Jun-06 14:39
membergotomy4-Jun-06 14:39 
GeneralRe: x64 manifest [modified] Pin
gotomy6-Jun-06 12:59
membergotomy6-Jun-06 12:59 
QuestionApplication configuration is incorrect Pin
Kinnos30-Jan-06 6:49
memberKinnos30-Jan-06 6:49 
JokeRe: Application configuration is incorrect Pin
Fiberman14-Feb-06 21:43
memberFiberman14-Feb-06 21:43 
GeneralRe: [ThnakYou!!]Application configuration is incorrect Pin
eojun8125-Dec-06 6:39
membereojun8125-Dec-06 6:39 
GeneralRe: Application configuration is incorrect Pin
Anil K P20-Feb-07 5:04
memberAnil K P20-Feb-07 5:04 

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

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

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