Skip navigation.

云舒云卷

----我醉欲眠卿且去,明朝有意抱琴来

Posts tagged with "comctl32"

Enable vista style for common controls

, ,

In visual studio 2005, they are several ways to enable it, but all are related to manifest file.
  1. 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>

  2. 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='*'\"")
    

  3. 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