Solved

XP Visual Style in MFC application. Urgent!

Posted on 2003-12-11
4
944 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 54
repeatEnd java challenge 42 85
Change to event 1 138
Making an alias 7 121
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.

738 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