Put this EXACTLY as it is written here near the very top of your main header file --
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' " "version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
And notice that there is NOT a semicolon after it. The best thing to do is just copy and paste it in, right after your #include(s), if you have any other #include(s) in your main header file.
In fact, in your main header file you should
#include Commctrl.h
and then after that and any other includes, then paste in the manifest above.
Now, in your WinMain() function do this --
1 2 3 4 5 6
|
INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_STANDARD_CLASSES | ICC_COOL_CLASSES;
InitCommonControlsEx(&icex);
|
Finally, you will have to add this library to your Linker | Input | Additional Dependencies --
comctl32.lib
Now your buttons will be XP style. In the last statement, i.e.,
icex.dwICC = etc.
you can use a number of different flags.
Look up INITCOMMONCONTROLSEX in MSDN.