Solved

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

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now