Solved

XP Visual Style in MFC application. Urgent!

Posted on 2003-12-11
4
931 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
You can try this also

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

Good Luck

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB.NET how to use the Vertical ScrollBar 5 87
xyBalance chalenge 58 88
repeatEnd java challenge 42 83
Hibernate methods 2 58
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now