The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: digelo on February 27, 2010, 07:14:35 AM

Title: How can i bind my application to comctl32.dll xD
Post by: digelo on February 27, 2010, 07:14:35 AM
sorry i use a new post for asking this.



Quote from: redskull
use a 'manifest' file to bound your application to the XP or Vista version of comctl32.dll (version 6.0, maybe 7.0).  This will, more or less, automatically update your forms from the old-school style to the new XP-style visual themes.

how can i do this xD?
Title: Re: How can i bind my application to comctl32.dll xD
Post by: hutch-- on February 27, 2010, 07:49:16 AM
digelo,

Ther are a couple of ways of doing this, first you must write an XML format manifest file then you can either put it in the same directory as the EXE or you can link it into the resource section.

Here is a simple XML file that you can do either with.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>Your App Name</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>


Change the line "<description>Your App Name</description>" so it has your exe name in it and then either link it into the resource section OR name it like this.

If your exe is "MyApp.exe", you name the XML file "MyApp.exe.manifest".
Title: Re: How can i bind my application to comctl32.dll xD
Post by: digelo on February 27, 2010, 08:14:41 AM
Ty hutch
Title: Re: How can i bind my application to comctl32.dll xD
Post by: redskull on February 27, 2010, 01:55:52 PM
Also, the newer versions of LINK.EXE have a manifest swtich, which can help to automate the creation.  Something like this will do all the dirty work at once:

..\bin\link.exe myapp.obj /SUBSYSTEM:WINDOWS "/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"

-r
Title: Re: How can i bind my application to comctl32.dll xD
Post by: redskull on February 27, 2010, 01:57:02 PM
Quote from: redskull on February 27, 2010, 01:55:52 PM
Also, the newer versions of LINK.EXE have a manifest swtich, which can help to automate the creation.  Something like this will do all the dirty work at once:

..\bin\link.exe myapp.obj /SUBSYSTEM:WINDOWS "/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"

Either way accomplishes the same thing

-r
Title: Re: How can i bind my application to comctl32.dll xD
Post by: thomas_remkus on June 04, 2010, 12:54:00 AM
Used the search function on the forum. Found this. Thanks for the solution.