
This is the stdafx.h file that I use to begin my WTL version 8.0 projects. I've found this is a good general purpose starting point for most projects.
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #undef _ATL_MIN_CRT // Change these values for different versions of Windows #define WINVER 0x0501 #define _WIN32_WINNT 0x0501 #define _WIN32_IE 0x0501 #define _RICHEDIT_VER 0x0300 // Definitions I use when mixing WTL 8.0 with the latest version of ATL #define _ATL_USE_CSTRING // some CString constructors will be explicit #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS #define _ATL_USE_CSTRING_FLOAT #define _ATL_USE_DDX_FLOAT #define _ATL_NO_OLD_NAMES #define _ATL_DISABLE_DEPRECATED #define _ATL_ALL_WARNINGS #define _ATL_NO_OLD_HEADERS_WIN64 #define _WTL_NEW_PAGE_NOTIFY_HANDLERS // I like to use CoInitializeEx when possible #define _WIN32_DCOM #include <atlbase.h> #include <atlapp.h> extern CAppModule _Module; #include <atlwin.h> #include <atlframe.h> #include <atlctrls.h> #include <atldlgs.h> #include <atlcrack.h> #include <atlmisc.h> #include <atlddx.h> // This is for some auxiliary calls, it has nothing to do with WTL/ATL #include <initguid.h> // The following lines are broken for formatting purposes. #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
Thursday, March 11