To do this, you have to include a manifest file.
Make a .manifest file, and put
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="NameOfProgram"
type="win32"
/>
<description>Description of your project.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Now, put your .manifest file in your project resources. It should be of type RT_MANIFEST and it's ID number should be 1. If you did it right, your project will now load the new common control library on startup and all your controls will be skinned/themed.