⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 platform.h

📁 A Model-View-Controller Framework that integrates with the MFC Doc/View architecture.
💻 H
字号:
#pragma once

/**
	Platform.h contains system wide #pragma settings and #defines. It should be the first 
	included file in the stdafx.h file of any SbjDev module.
*/

#pragma message("Including Platform.h")

// SBJ 07.11.17 Use XP controls
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")

#pragma warning (disable : 4290)	// C++ Exception Specification ignored
#pragma warning (disable : 4097)	// typedef-name used as synonym for class-name 
#pragma warning (disable:4800)		// forcing value to bool 'true' or 'false' (performance warning)
#pragma warning (disable:4505)		// unreferenced local function has been removed
#pragma warning (disable:4514)      // unreferenced inline function has been removed

#pragma warning(disable:4996)  // This function or variable may be unsafe. Consider using

// Lib and DLL naming /////////////////////////////////////////////////////////////////////////////////////////////


#ifdef _DEBUG
	#ifdef _UNICODE
		#define _CFG_SUFFIX "UD"
	#else
		#define _CFG_SUFFIX "D"
	#endif
#else
	#ifdef _UNICODE
		#define _CFG_SUFFIX "U"
	#else
		#ifdef _DEBUGGING
			#define _CFG_SUFFIX "RD"
		#else
			#define _CFG_SUFFIX ""
		#endif
	#endif
#endif

#define MAKE_LIBNAME(libName) _T(#libName)_T(_CFG_SUFFIX)_T(".lib")

#define MAKE_DLLNAME(dllName) _T(#dllName)_T(_CFG_SUFFIX)_T(".dll")

#define LIBLINK_MSG(libName) _T("Automatically linking with static library ")MAKE_LIBNAME(libName)

#define DLLLINK_MSG(libName) MAKE_DLLNAME(libName)_T(" automatically linking with import library ")MAKE_LIBNAME(libName)

// SBJ 07.04.10 The following handle new versioned DLLs and Implibs
#define COMMON_VERSION "2090"

#define MAKE_VERSIONED_LIBNAME(libName) _T(#libName)_T(COMMON_VERSION)_T(_CFG_SUFFIX)_T(".lib")

#define MAKE_VERSIONED_DLLNAME(dllName) _T(#dllName)_T(COMMON_VERSION)_T(_CFG_SUFFIX)_T(".dll")

#define MAKE_VERSIONED_DLLBASENAME(dllName) _T(#dllName)_T(COMMON_VERSION)

#define VERSIONED_DLLLINK_MSG(libName) MAKE_VERSIONED_DLLNAME(libName)_T(" automatically linking with import library ")MAKE_VERSIONED_LIBNAME(libName)

// Registered Windows message creation ////////////////////////////////////////////////////////////////

#define DECLARE_USER_MESSAGE(name, guid) \
     static const UINT name = ::RegisterWindowMessage(_T(#name)_T(#guid));

#define DECLARE_REGISTERED_MESSAGE(name, guid) \
	static const UINT name = ::RegisterWindowMessage(_T(#name)_T(#guid));
	
#define DECLARE_ID(name, guid) \
	static const UINT name = ::RegisterClipboardFormat(_T(#name)_T(#guid));


#define DECLARE_REGISTERED_CLIPFORMAT(name, guid) \
	static const CLIPFORMAT name = (CLIPFORMAT)::RegisterClipboardFormat(_T(#name)_T(#guid)); \
	static LPCTSTR STR_##name = _T(#name);



// determine number of elements in an array (not bytes) for MBCS & Unicode
#ifndef _countof
#define _countof(array) (sizeof(array)/sizeof(array[0]))
#endif
#ifndef ELEMENTS
#define ELEMENTS(array) (sizeof(array)/sizeof((array)[0]))
#endif

#define localNS  // use to identify anonymous namespace members

/*HTREEITEM is defined as typedef struct _TREEITEM* HTREEITEM; for typesafety.
In native C++, not having struct _TREEITEM define is not a problem, but in
managed C++ functions that return HTREEITEM (such as CTreeCtrl::InsertItem()) 
will throw TypeLoadException when the CLR is trying to resolve struct _TREEITEM*.
*/
struct _TREEITEM { _TREEITEM() {} };

#include <afxwin.h>         // MFC core and standard components

// COM ///////////////////////////
#include <comdef.h>

// STL Headers (alphabetical order)/////////////////////

#include <algorithm> 
#include <bitset> 
#include <cassert> 
#include <cctype> 
#include <cerrno> 
#include <cfloat> 
#include <ciso646> 
#include <climits> 
#include <clocale> 
#include <cmath> 
#include <complex> 
#include <csetjmp> 
#include <csignal> 
#include <cstdarg> 
#include <cstddef> 
#include <cstdio> 
#include <cstdlib> 
#include <cstring> 
#include <ctime> 
#include <cwchar> 
#include <cwctype> 
#include <deque> 
#include <exception> 
#include <fstream> 
#include <functional> 
#include <hash_map> 
#include <hash_set> 
#include <iomanip> 
#include <ios> 
#include <iosfwd> 
#include <iostream> 
#include <istream> 
#include <iterator> 
#include <limits> 
#include <list> 
#include <locale> 
#include <map> 
#include <memory> 
#include <new> 
#include <numeric> 
#include <ostream> 
#include <queue> 
#include <set> 
#include <sstream> 
#include <stack> 
#include <stdexcept> 
#include <streambuf> 
#include <string> 
#include <strstream> 
#include <utility> 
#include <vector> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -