In VS2010, use the New Project wizard to create an MFC dialog application (actually any MFC application will do). Choose defaults for all options and let the wizard generate the code.
When it's done, look in the file stdafx.h
and copy/paste the following block into your stdafx.h
#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
You can also do this via Project/Properties, but by doing it in the code, it won't break if you share the source with other projects.
Note that there is an #ifdef _UNICODE
in there because a small number of common controls only work correctly for UNICODE builds. However, if you need and non-UNICODE build and are only using "standard" Windows controls (e.g. no List Views or Tree Views, etc.) it's ok to remove the #ifdef
.