Solved

XP Visual Style in MFC application. Urgent!

Posted on 2003-12-11
4
942 Views
Last Modified: 2013-11-20
Question 1:
I've have read the "Using Windows XP Visual Type" article in MSDN, it tell about how to make your controls have "look and feel" like XP, it says that we have to use ComCtl32.dll version 6, and specify a manifest file.
How can I link my MFC application(Visual C++ 6.0) with ComCtl32.dll version 6 and how can I add the manifest file in my project?
Because ComCtl32.dll version 6 is no redistributable, will my application have XP visual style when it run on a Windows 2000 or NT 4.0,....?
Thankx
0
Comment
Question by:tinh911
4 Comments
 
LVL 13

Assisted Solution

by:SteH
SteH earned 100 total points
ID: 9921396
To the last Q: no it won't. the app will work but not using the XP style. Changes of the controls using the XP style are in version 6 of the dll. If this is not present you won't have those effects.

And the TN
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp
explanes how to get your app using v6 of the controls.

The mainifest file is in that TN and you just have to create file and paste it into it. And then you add the file to your project like adding a C,H,CPP to your project.
0
 

Author Comment

by:tinh911
ID: 9921427
I've already read that artical, its information is good, but it's too general, I just want to make XP style for my MFC application, please help!
0
 
LVL 9

Accepted Solution

by:
Priyesh earned 200 total points
ID: 9925624
1. Open your resource view, right click, select add resource, Click on the Custom button, Enter RT_MANIFEST as the new resource type.
This will add a resource type RT_MANIFEST and a blank binary file for IDR_RT_MANIFEST1 . you will find yourapp.manifest file in your res directory if the application is created in windows xp. Open the file, copy contents and paste it to the blank binary file. Save.

Open your resource.h file, change IDR_RT_MANIFEST 's id number to 1.

open stdafx.h and change or add
#ifndef _WIN32_IE                  // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0600      // Change this to the appropriate value to target IE 5.0 or later.
#endif

rebuild all and you should be getting theme enabled controls in xp machines. If you changed the display settings to windows classic style, your applications wont use xp theme drawing.

To see how your app will behave in 2000 or lower, right click the exe file, select properties, select the compatibility tab and make changes to run in compatibility mode for 2000 or lower.. you can also disable visual themes for your app from there.

0
 
LVL 23

Assisted Solution

by:Roshan Davis
Roshan Davis earned 200 total points
ID: 9925815
You can try this also

http://www.codeproject.com/library/guitoolkit.asp - GuiToolkit MFC Extension

Good Luck

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sumNumber challenge 16 140
if loop in java 3 160
moto 4g phone enable finger print 4 42
I could not set window to top 4 40
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question