Click here to Skip to main content
15,391,067 members
Articles / Desktop Programming / MFC
Article
Posted 19 Mar 2003

Stats

113.5K views
1.6K downloads
38 bookmarked

MakeXP

Rate me:
Please Sign up or sign in to vote.
4.61/5 (16 votes)
28 Mar 20032 min read
A utility that allows you to easily add XP theme support to your applications

Introduction

MakeXP is a little utility that will automatically give your VC++6 Apps the Look & Feel of Windows XP. I got tired of having to make the manifest file, write the compile directive, etc. by hand every time i wanted my project to use the new windows XP looks, so I wrote this little app to do all the work for me. 

Once you give it a little information about your Project MakeXP Will:

  • Generate a custom manifest file, and put it on your project´s /res Directory
  • Modify your project´s .dsp file to include the manifest file.
  • Write the proper Compile directive to your project´s .rc2 file
  • Make backups of your .rc2 and .dsp files BEFORE modifying them, in case of trouble

Requirements 

Before you use MakeXP, Make sure your project meets the following conditions:

  • Made using Visual C++ 6 (might work on 5.0 or .NET, but i haven't tested it on it)
  • Has a valid .rc2 file (if you made the project with app wizard, then it does)
  • Works on both MFC and Win32 Applications, as long as they have a valid .rc2 file
  • A recent copy of the Microsoft Platform SDK update installed on the PC where you compile your applications
  • In your target applications (the ones you run MakeXP on), you need to link to ComCtl32.lib (in Project / settings /link) and call InitCommonControls early in your application (like in InitInstance )

Using the code

  1. Compile the application
  2. Run it
  3. Use the first "Find" button to select your project´s .dsp file, the rest of the fields will be filled automatically
  4. Verify that all values are correct and that your project is not open!
  5. Press the "MakeXP" button
  6. That's it! enjoy your XP looks! (assuming your DO have windows XP :) 

Note: If you have any trouble loading / using your project after you used MakeXP on it, just delete your .dsp / ,rc2 files and restore the backup files MakeXP made. These files will be named with a .BAK extension like: MyApp.dsp.BAK MyApp.rc2.BAK.

Points of Interest

Apart from being a useful utility, the code behind it illustrates the following points:

  • Reading, Parsing and Writting to / From Text files using fstream
  • Using some "advanced" CString functions like Find, ReverseFind, GetBufferSetLen, etc.
  • Basic file operations like CopyFile, DeleteFile etc.
  • Changing the colors used on a Dialog (on itself and it´s children)

History

  • 29 Mar 03 - updated requirements list. Some readers were having trouble getting the application to work

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

Ernesto D.
Web Developer
Mexico Mexico
No Biography provided

Comments and Discussions

 
GeneralMy vote of 2 Pin
KarstenK9-Dec-09 21:52
mveKarstenK9-Dec-09 21:52 
GeneralVS2008 - making an old MFC app have the new XP controls Pin
theory200627-May-09 7:06
Membertheory200627-May-09 7:06 
GeneralUsing with .NET Pin
Shraddhan15-Jun-05 18:35
MemberShraddhan15-Jun-05 18:35 
QuestionVisual C++ a must? Pin
spajjk21-Feb-04 16:28
Memberspajjk21-Feb-04 16:28 
GeneralPlaying CAnimateCtrls Pin
ajhuddy8-Jul-03 8:08
Memberajhuddy8-Jul-03 8:08 
GeneralStill not work!! Pin
gkcc23-Apr-03 12:07
Membergkcc23-Apr-03 12:07 
GeneralRe: Still not work!! Pin
Yves Tkaczyk30-Oct-03 11:54
MemberYves Tkaczyk30-Oct-03 11:54 
GeneralAnother question about DLLs Pin
.:MART!N:.14-Apr-03 23:36
Member.:MART!N:.14-Apr-03 23:36 
GeneralRe: Another question about DLLs Pin
.:MART!N:.14-Apr-03 23:59
Member.:MART!N:.14-Apr-03 23:59 
QuestionHow can I make the manifest work for a DLL? Pin
Jim McCurdy1-Apr-03 8:36
MemberJim McCurdy1-Apr-03 8:36 
AnswerRe: How can I make the manifest work for a DLL? Pin
theory200627-May-09 6:57
Membertheory200627-May-09 6:57 
Generalmanifest file - question Pin
Irek Zielinski30-Mar-03 20:15
MemberIrek Zielinski30-Mar-03 20:15 
GeneralRe: manifest file - question Pin
Ernesto D.30-Mar-03 21:15
MemberErnesto D.30-Mar-03 21:15 
GeneralRe: manifest file - question Pin
delete[]21-Nov-03 1:15
Memberdelete[]21-Nov-03 1:15 
GeneralMake XP Didn't Work Pin
Member 30008722-Mar-03 13:21
MemberMember 30008722-Mar-03 13:21 
GeneralRe: Make XP Didn't Work Pin
Ernesto D.22-Mar-03 19:56
MemberErnesto D.22-Mar-03 19:56 
GeneralRe: Make XP Didn't Work Pin
24-Mar-03 10:38
suss24-Mar-03 10:38 
GeneralRe: Make XP Didn't Work Pin
Ernesto D.27-Mar-03 14:58
MemberErnesto D.27-Mar-03 14:58 
GeneralRe: Make XP Didn't Work Pin
Terry Denham31-Mar-03 12:01
MemberTerry Denham31-Mar-03 12:01 
GeneralRe: Make XP Didn't Work Pin
Yves Tkaczyk30-Oct-03 11:56
MemberYves Tkaczyk30-Oct-03 11:56 
Generalthe manifest file Pin
BigJones21-Mar-03 10:27
sussBigJones21-Mar-03 10:27 
GeneralRe: the manifest file Pin
Ernesto D.21-Mar-03 14:19
MemberErnesto D.21-Mar-03 14:19 
GeneralGood Idea Pin
Ryan Binns21-Mar-03 1:06
MemberRyan Binns21-Mar-03 1:06 
GeneralRe: Good Idea Pin
RancidCrabtree1-Apr-03 6:26
MemberRancidCrabtree1-Apr-03 6:26 

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.