Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

XP Visual Style in MFC application. Urgent!

Posted on 2003-12-11
4
Medium Priority
?
951 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 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

721 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