I’ve written an application in C++ using the pure win32 api (no MFC or WPF).
I want the same .exe to run under both Window’s XP and Windows Vista / Windows 7.
I was using a manifest to add Visual Styles to the controls in my application. However, when I tested the app on an XP Machine, Buttons do not show up. Only Edit controls and the Menu Bar do.
Edit: I think I forgot to mention this, but the application works fine on WIndows 7/Vista.
Edit 2: I’m using the MinGW compiler
I thought that this was a problem with the manifest, so I removed it and recompiled my program. But the buttons still don’t show up.
The manifest that I am using is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="BlackJack.Viraj"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.2600.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Does the problem lie in the manifest or is it something else?
Make sure you call InitCommonControlsEx