Solved

Is it possible to use xp styles with Visual Studio C++ 2008 and MFC?

Posted on 2009-04-05
3
359 Views
Last Modified: 2013-11-20
Hello,

I still have some projects writte in C++ MFC. These do not support xp styles at all. With VC6 I could add a manifest which works fine. With VS2008 I did not get it to work.

Do anyone have a solution for this? Or is this not supported anymore?

Stefan
0
Comment
Question by:StefanKittel
[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
  • 2
3 Comments
 
LVL 19

Expert Comment

by:mrwad99
ID: 24086684
What Visual Style are you trying to add that is failing in VS2008?
0
 
LVL 4

Author Comment

by:StefanKittel
ID: 24086726
Hello,

when I compile my program it looks like windows 95 or 2000. I would like to have the xp-style-progressbar with the shining green effect.

Stefan
0
 
LVL 19

Accepted Solution

by:
mrwad99 earned 500 total points
ID: 24086940
Hmm...

I have just created a simple dialog app in VS2008 and adding a progress bar running off a timer; it displays using the XP visual style (see below).

The manifest generated by VS (which is embedded in the EXE; I opened the EXE in VS2008 to get this) looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

Do the same with your EXE and compare its manifest to this one.

Just as a sidenote, you do have the XP theme enabled in your computer's display properties, don't you?  Otherwise, you won't get the app using the XP themes...
Working.JPG
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

728 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