Welcome to MSDN Blogs Sign in | Join | Help

Windows XP Look & Feel with manifest

Windows XP has a new Common Controls library comctl32.dll version 6, which implements XP's look & feel.

comctl32.dll version 6 is a side by side assembly deployed to %windir%\WinSxs (the equavalent of GAC in Fusion/Win32).

For compatibility reason, by default your application will use the comctl32.dll version 5 in %windir%\system32, unless you specify that you want comctl32.dll version 6 using a manifest file.

Here is an example of the manifest file:

c:\more fuslogvw.exe.manifest

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="Microsoft.FUSLOGVW" type="win32" />
<description>Microsoft .Net Framework Assembly Binding Log Viewer</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
</assembly>

It is crucial that you say 'processorArchitecture="*"' in the manifest file. If you mention ''processorArchitecture="x86"', your application will not be able to launch in 64 bit Windows.

Published Tuesday, November 02, 2004 2:28 PM by junfeng
Filed under: ,

Comments

# re: Windows XP Look & Feel with manifest

Tuesday, November 02, 2004 4:57 PM by Matt Hawley
Great for 1.0, however in 1.1, all you have to do is call Application.EnableVisualStyles() prior to launching your form. In fact, an even better method, is to use a 3rd party assembly from Skybound (www.skybound.ca) ... its the "VisualStyles" free assembly.

# re: Windows XP Look & Feel with manifest

Tuesday, November 02, 2004 6:12 PM by Junfeng Zhang
The manifest works for everything, not just for managed applications.

The example I shown is on fuslogvw.exe, which is an unmanaged application.

# re: Windows XP Look & Feel with manifest

Tuesday, November 02, 2004 11:36 PM by Simon
I'll give this a try - the standard visual styles support leaves a LOT of bugs behind, simple ones too - like clicking on the scrollbars of a combobox.

Hopefully it'll work better using version 6 of comctl32...

# re: Windows XP Look & Feel with manifest

Wednesday, November 03, 2004 11:26 AM by Jesse
If you put "processorArchitecture="x86"" will the application fail compeltely on 64bit Windows, or will it just run in 32bit mode?

# re: Windows XP Look & Feel with manifest

Wednesday, November 03, 2004 11:53 AM by Junfeng Zhang
If the application is a native 64 bit application, it will completely fail. If it is a 32 bit application, then it will run in 32 bit mode. Manifest does not decide which mode the application runs. The PE does.

# re: Windows XP Look & Feel with manifest

Thursday, November 18, 2004 2:16 PM by Dan
If you happen to be writing a VB6 app it is possible by also calling InitCommonControls, but not supported.

See:
http://support.microsoft.com/?id=309366
New Comments to this post are disabled
 
Page view tracker