如果我们想要windows XP或XP以上操作系统的风格的系统控件,请使用下面的宏.如果你在XP下编译Windows程序,控件默认的的风格是win 2K的,默认使用的comctl32.dll的版本默认是5.8,即win 2K的所使用的库.而windows XP或XP以上操作系统的风格的系统控件则使用的是6.0版本的。
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:/"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'/"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:/"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'/"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:/"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'/"")
#else
#pragma comment(linker,"/manifestdependency:/"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'/"")
#endif
#endif