Enable vista style for common controls
Tuesday, 24. June 2008, 09:56:11
In visual studio 2005, they are several ways to enable it, but all are related to manifest file.
All in all, DO NOT put the following codes into 'project setting'->'Manifest tool'->'General'->'Assembly Identity':
- Create a manifest manually with following codes, and input its path to the 'project setting'->'Manifest tool'->'Input and output'->'Additional manifest files':
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly>
- Put the following code in the source file:
#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Test.Research.SampleAssembly' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='0000000000000000' language='*'\"")
- Put the following code to 'project setting'->'liker'->'Manifest file'->'Additional Manifest Dependencies':
"name='Microsoft.Windows.Common-Controls' processorArchitecture='x86' version='6.0.0.0' type='win32' publicKeyToken='6595b64144ccf1df'"
All in all, DO NOT put the following codes into 'project setting'->'Manifest tool'->'General'->'Assembly Identity':
Microsoft.Windows.Common-Controls, processorArchitecture=x86, version=6.0.0.0, type=win32, publicKeyToken=6595b64144ccf1df














