Gen GUI Runtime with different Microsoft.Windows.Common-Controls

Document ID : KB000011333
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

After Microsoft upgraded its Microsoft.Windows.Common-Controls (ComCtl32.dll) from version 5 to version 6, some differences could be seen within the Gen GUI applications. 

Answer:

After Microsoft upgraded its Microsoft.Windows.Common-Controls (ComCtl32.dll) from version 5 to version 6, some differences could be seen within the GUI applications.   Version 6 of the Common Controls allows the client area of the generated GUI applications to use the visual styles selected in the desktop. Therefore, changes will be observed in the visual styles of controls on windows when changes are made to the Display properties of the desktop through the Appearance tab in the Windows Control Panel.  

 

Some customers have expressed the need to use the earlier version of the Microsoft Common Controls.   The version of the ComCtl32.dll used for the Gen GUI applications can be controlled by the use of a manifest file (<application>.exe.mnaifest).   Even though a manifest file is not needed, if it exists for an application it will be used.  

 

Starting with Visual Studio 2010 and later, Microsoft changed it to where manifests were no longer needed.  Therefore (keeping in step with Microsoft) in Gen 8.5, the logic to implement token OPT.APPMANIFEST was removed from the build tool. Note that the token, however, was inadvertently left in as a Profile Manager option.  

 

With Gen 8.6, BTN86108 has been published which not only delivers a manifest file containing only the Microsoft Common Controls, but also updates scripts to reimplement the logic to create an external manifest.          

 

With this 8.6 ptf, the values for token OPT.APPMANIFEST are YES or NO (instead of the old values of EMBEDDED or EXTERNAL).   Setting this token to YES will cause an external manifest to be created.  BTN86108 also introduces a new USER token in the Profile Manager with key OPT.MANIFEST_FILE.  This token is used when an alternate manifest file is needed (instead of the default).  Its value is the fully qualified manifest name.                If a manifest is desired with 8.5, the user may create an <application>.exe.manifest file like the following using the desired common controls version:   <dependency>  

 <dependentAssembly>  

  <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls'  

        version='6.0.0.0' processorArchitecture='x86'  

        publicKeyToken='6595b64144ccf1df' language='*' />  

  </dependentAssembly>  

</dependency>

 

 

Additional Information:

 Note: It is not necessary to rebuild the code; simply execute the application.

 

 Disclaimer: Although we do not expect any problems using the 5.8 version of this ComCtl32.dll, please note that Gen was tested using version 6 of this control.