Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an application written in VC6 that includes the typical XP visual styles manifest in the directory along with the exe (app.exe.manifest). It's contents are 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="x86"
    name="Company.Product.App"
    type="win32"
/>
<description>Application Description</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    processorArchitecture="x86"
    publicKeyToken="6595b64144ccf1df"
    language="*"
/>
</dependentAssembly>
</dependency>
</assembly>



This gives the expected result running on XP. I just tried this for the first time on x64 Windows 7, but it isn't using visual styles. I have not tried this on any other x64 OS, nor have I tried on x86 Windows (or Vista for that matter).

I saw some references to changing processorArchitecture to "*" to get it to work with x64, so I tried that, but it didn't make any difference. Is there a way to make this work?
Posted
Updated 13-Feb-10 5:28am
v2

1 solution

Look at this:
C++
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif


I found it here: http://www.codeguru.com/forum/showthread.php?t=467722[^]

I have seen this code generated for VS2008 projects, so I'm assuming it ought to work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900