Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

XP Visual Style in MFC application. Urgent!

Posted on 2003-12-11
4
Medium Priority
?
965 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 300 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 600 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 600 total points
ID: 9925815
You can try this also

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

Good Luck

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

783 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