You should enable the XP common control style.
The easiest way to do this is to include this in your manifest file, e.g. by adding it to the linker, or adding a pragma in your code, like this:
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
EDIT: It might also be needed to explicitly initialize the common controls (not 100% sure), like this:
INITCOMMONCONTROLSEX InitStr;
InitStr.dwSize = sizeof(InitStr);
InitStr.dwICC = ICC_WIN95_CLASSES|ICC_DATE_CLASSES|ICC_COOL_CLASSES;
// Other classes are: ICC_COOL_CLASSES, ICC_INTERNET_CLASSES, ICC_PAGESCROLLER_CLASS, ICC_USEREX_CLASSES
InitCommonControlsEx(&InitStr);
It might also be needed to compile with the correct windows version defines. I compile using these command line options:
/D_WIN32_WINNT#0x0501 /DWINVER#0x0501 /D_WIN32_IE#0x0500
But this always implies that the application needs at minimum Windows XP.
EDIT2 (as an answer to sreyan's comment):
I tried compiling the following source file (called test.cpp):
#include <iostream>
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
void main()
{
std::cout << "Hello World" << std::endl;
}
Using the following commands:
cl /EHsc /MD /c test.cpp
link test.obj
And the following files were generated:
23-04-12 10:49 9 728 test.exe
23-04-12 10:49 638 test.exe.manifest
23-04-12 10:49 16 812 test.obj
The test.exe.manifest file contains this:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*' />
</dependentAssembly>
</dependency>
</assembly>
So this seems to be working correctly.
Recheck the options you filled in in Visual Studio, and the pragma you've added.
Try with a small app first (like the one above) until you get it working correctly.
Then move on to your big application. If it doesn't work, compare what's different with the small app.
Success.