[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

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

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
StefanKittel
Asked:
StefanKittel
  • 2
1 Solution
 
mrwad99Commented:
What Visual Style are you trying to add that is failing in VS2008?
0
 
StefanKittelAuthor Commented:
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
 
mrwad99Commented:
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

Technology Partners: 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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now