Solved

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

Posted on 2009-04-05
3
354 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
  • 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
source code to scan multiple images 6 90
Convert money to nchar 4 61
mapBully challenge 6 133
Updating statistics with error notification email in SQL server 4 95
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 …
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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