Solved

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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