Windows XP introduced visual styles, a way to provide a new look to the common controls, with ComCtl32.dll version 6.0. Unlike previous versions of this library, version 6.0 is not redistributable.
There are two ways to make an existing application theme aware:
Additionaly, the application must initialize the common controls library by calling the InitCommonControls or InitCommonControlsEx API functions.
The manifest XML document required to use XP visual styles is as follows:
To compile the manifest as a resource in your application, the manifest must appear as a resource type RT_MANIFEST(24) with the identifier CREATEPROCESS_MANIFEST_RESOURCE_ID(1):
For a complete explanation of how to make and use resource files with PowerBASIC see the topic "Resource Files" in the help file or manual of your compiler.
Beginning with PowerBASIC 10, you can use the #RESOURCE directive to include the manifest directly:
MSDN documentation: http://msdn.microsoft.com/en-us/library/bb773187%28VS.85%29.aspx
Attached to this post there is a help file with the Visual Styles documentation adapted to the PowerBASIC syntax.
There are two ways to make an existing application theme aware:
- Create a manifest file named <MyApp>.exe.manifest, where Myapp is the name of your application, in the same directory where your application resides.
- Create a manifest file and add it to the resource file used by your application.
Additionaly, the application must initialize the common controls library by calling the InitCommonControls or InitCommonControlsEx API functions.
The manifest XML document required to use XP visual styles is as follows:
Code:
[Select]
<?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="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
To compile the manifest as a resource in your application, the manifest must appear as a resource type RT_MANIFEST(24) with the identifier CREATEPROCESS_MANIFEST_RESOURCE_ID(1):
Code:
[Select]
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST 24
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "MyManifest.xml"
or you can use the actual numeric values:
Code:
[Select]
1 24 "MyManifest.xml"
For a complete explanation of how to make and use resource files with PowerBASIC see the topic "Resource Files" in the help file or manual of your compiler.
Beginning with PowerBASIC 10, you can use the #RESOURCE directive to include the manifest directly:
Code:
[Select]
#RESOURCE MANIFEST, 1, "MyManifest.xml"
MSDN documentation: http://msdn.microsoft.com/en-us/library/bb773187%28VS.85%29.aspx
Attached to this post there is a help file with the Visual Styles documentation adapted to the PowerBASIC syntax.