Modern Windows GUI visual styles

Roald Ribe rr.nospam at nospam.teikom.no
Wed Sep 9 16:01:41 PDT 2009


Stewart Gordon wrote:
> Indeed, I drove myself mad trying to find out how to make it work, and 
> eventually discovered keeping a .manifest file alongside the .exe.  We 
> need more resources (NPI) teaching how to do it the tidier way.

In your .rc file (which more or less all WIN32 GUI apps needs anyway)
write in a line like:

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "manifest.xml"

*** In a separate file named: manifest.xml

<?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="Microsoft.Windows.Generic"
     type="win32"
/>
<description>YourApplication</description>
<dependency>
     <dependentAssembly>
         <assemblyIdentity
             type="win32"
             name="Microsoft.Windows.Common-Controls"
             version="6.0.0.0"
             processorArchitecture="X86"
             publicKeyToken="6595b64144ccf1df"
             language="*"
         />
     </dependentAssembly>
</dependency>
</assembly>

Also to work, the executable flags of the .exe file has to specifiy
NT version 4.0 or higher as a requirement (probably default in most
compilers by now.)

Roald



More information about the Digitalmars-d mailing list