Using Windows XP Visual Styles
Perhaps the quickest/shortest route is to link with comctl32.lib, use InitCommonControlsEx and include the manifest file in the same directory as the executable. For example:
Code:
#include <windows.h>
#include <tchar.h>
#if defined __MINGW_H
#define _WIN32_IE 0x0400
#endif
#include <commctrl.h> /*link with comctl32.lib (-lcomctl32 with DevCpp(MinGW))*/
int WINAPI _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,int nCmdShow)
{
INITCOMMONCONTROLSEX iccx;
iccx.dwSize=sizeof(INITCOMMONCONTROLSEX);
iccx.dwICC=0;
InitCommonControlsEx(&iccx);
MessageBox(0,
_T("Don't forget to include your xp manifest\nin the same directory as this exe."),
_T("XP Manifest Styles"),
MB_OK);
return 0;
}
Build that and call the exe 'manifest_demo.exe' then save the following as manifest_demo.exe.manifest in the same directory:
Code:
<?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.manifest_demo.exe"
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>