26 October 2006

Porting to Visual Studio 2005

I've covered a variety of the areas for porting to Visual Studio 2005 in some previous posts, as it is not as simple as it should be. It seems that although it is relatively easy to get it compiled there is a lot of performance and stability work to be undertaken.

The posts are:There is also one area that needs looking at as you may notice you are not getting the Windows XP look and feel. This is a pain because the way manifests work has changed. You need to go to your stdafx.h file or the main .cpp file and add the following:

#if _MSC_VER >= 1400
#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 //_UNICODE
#endif //_MSC_VER >= 1400
Just copy and paste this, the formatting will be correct.