home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / MFCINC.PAK / AFXVER_.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  10.5 KB  |  333 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. // afxver_.h - target version/configuration control
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // Master version numbers
  15.  
  16. #define _AFX     1      // Microsoft Application Framework Classes
  17. #define _MFC_VER 0x0410 // Microsoft Foundation Classes version 4.10
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // Default swap tuning for AFX library
  21.  
  22. #ifndef _68K_
  23.     #define _TEXTSEG(name)  ".text$" #name
  24. #else
  25.     #define _TEXTSEG(name)  #name, "swappable"
  26. #endif
  27.  
  28. // Most segments are tuned via function order list (DLL version)
  29. #ifndef _AFX_FUNCTION_ORDER
  30. #define AFX_CORE1_SEG   _TEXTSEG(AFX_CORE1) // core functionality
  31. #define AFX_CORE2_SEG   _TEXTSEG(AFX_CORE2) // more core functionality
  32. #define AFX_CORE3_SEG   _TEXTSEG(AFX_CORE3) // more core functionality
  33. #define AFX_CORE4_SEG   _TEXTSEG(AFX_CORE4) // more core functionality
  34. #define AFX_AUX_SEG     _TEXTSEG(AFX_AUX)   // auxilliary functionality
  35. #define AFX_COLL_SEG    _TEXTSEG(AFX_COL1)  // collections
  36. #define AFX_COLL2_SEG   _TEXTSEG(AFX_COL2)  // more collections
  37. #define AFX_OLE_SEG     _TEXTSEG(AFX_OLE1)  // OLE support
  38. #define AFX_OLE2_SEG    _TEXTSEG(AFX_OLE2)  // more OLE support
  39. #define AFX_OLE3_SEG    _TEXTSEG(AFX_OLE3)  // and more OLE support
  40. #define AFX_OLE4_SEG    _TEXTSEG(AFX_OLE4)  // and more OLE support
  41. #define AFX_OLE5_SEG    _TEXTSEG(AFX_OLE5)  // and even more OLE support
  42. #define AFX_OLERA_SEG    _TEXTSEG(AFX_OLERA) // (reserved for future use)
  43. #define AFX_PRINT_SEG   _TEXTSEG(AFX_PRNT)  // Printing functionality
  44. #define AFX_DBG1_SEG    _TEXTSEG(AFX_DBG1)  // inlines go here in _DEBUG
  45. #define AFX_DBG2_SEG    _TEXTSEG(AFX_DBG2)  // inlines go here in _DEBUG
  46. #define AFX_VDEL_SEG    _TEXTSEG(AFX_VDEL)  // vector deleting destructors
  47. #define AFX_TERM_SEG    _TEXTSEG(AFX_TERM)  // cleanup routines
  48. #define AFX_MAPI_SEG    _TEXTSEG(AFX_MAPI)  // simple MAPI support
  49. #define AFX_SOCK_SEG    _TEXTSEG(AFX_SOCK)  // windows sockets support
  50. #else
  51. #define AFX_CORE1_SEG                       // core functionality
  52. #define AFX_CORE2_SEG                       // more core functionality
  53. #define AFX_CORE3_SEG                       // more core functionality
  54. #define AFX_CORE4_SEG                       // more core functionality
  55. #define AFX_AUX_SEG                         // auxilliary functionality
  56. #define AFX_COLL_SEG                        // collections
  57. #define AFX_COLL2_SEG                       // more collections
  58. #define AFX_OLE_SEG                         // OLE support
  59. #define AFX_OLE2_SEG                        // more OLE support
  60. #define AFX_OLE3_SEG                        // and more OLE support
  61. #define AFX_OLE4_SEG                        // and more OLE support
  62. #define AFX_OLE5_SEG                        // and even more OLE support
  63. #define AFX_OLERA_SEG                        // (reserved for future use)
  64. #define AFX_PRINT_SEG                       // Printing functionality
  65. #define AFX_DBG1_SEG                        // inlines go here in _DEBUG
  66. #define AFX_DBG2_SEG                        // inlines go here in _DEBUG
  67. #define AFX_VDEL_SEG                        // vector deleting destructors
  68. #define AFX_TERM_SEG                        // cleanup routines
  69. #define AFX_MAPI_SEG                        // simple MAPI support
  70. #define AFX_SOCK_SEG                        // windows sockets support
  71. #endif
  72.  
  73. // AFX_INIT_SEG is hand tuned even in DLL version
  74. #define AFX_INIT_SEG    _TEXTSEG(AFX_INIT)  // initialization
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // turn off reference tracking for certain often used symbols
  78.  
  79. #ifndef _AFX_PORTABLE
  80. #pragma component(browser, off, references, "ASSERT")
  81. #pragma component(browser, off, references, "AfxAssertFailedLine")
  82. #pragma component(browser, off, references, "AfxDebugBreak")
  83. #pragma component(browser, off, references, "BOOL")
  84. #pragma component(browser, off, references, "BYTE")
  85. #pragma component(browser, off, references, "DECLSPEC_IMPORT")
  86. #pragma component(browser, off, references, "DWORD")
  87. #pragma component(browser, off, references, "FALSE")
  88. #pragma component(browser, off, references, "FAR")
  89. #pragma component(browser, off, references, "LPSTR")
  90. #pragma component(browser, off, references, "NULL")
  91. #pragma component(browser, off, references, "PASCAL")
  92. #pragma component(browser, off, references, "THIS_FILE")
  93. #pragma component(browser, off, references, "TRUE")
  94. #pragma component(browser, off, references, "UINT")
  95. #pragma component(browser, off, references, "WINAPI")
  96. #pragma component(browser, off, references, "WORD")
  97. #endif  //!_AFX_PORTABLE
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100. // For target version (one of)
  101. //   _CUSTOM   : for custom configurations (causes afxv_cfg.h to be included)
  102. //
  103. // Additional build options:
  104. //  _DEBUG              debug versions (full diagnostics)
  105. //  _AFXDLL             use shared MFC DLL
  106. //  _AFXEXT             extension DLL version, implies _AFXDLL
  107. //  _USRDLL             create regular DLL (_AFXDLL is valid too)
  108. //
  109.  
  110. #ifndef _DEBUG
  111.     #define _AFX_ENABLE_INLINES
  112. #endif
  113.  
  114. #define _AFX_NO_NESTED_DERIVATION
  115.  
  116. /////////////////////////////////////////////////////////////////////////////
  117. // Special configurations
  118.  
  119. // _AFXEXT implies _AFXDLL
  120. #if defined(_AFXEXT) && !defined(_AFXDLL)
  121.     #define _AFXDLL
  122. #endif
  123.  
  124. #ifdef __BORLANDC__
  125. #  if defined(_AFXDLL) && !defined(_RTLDLL)
  126. #    error The dynamic MFC library requires the dynamic RTL.
  127. #  endif
  128. #else
  129. #  if defined(_AFXDLL) && !defined(_DLL)
  130. #    error Please use the /MD switch for _AFXDLL builds
  131. #  endif
  132. #endif
  133.  
  134. #ifndef _MAC
  135. #if defined(_AFXDLL) && !defined(_MT)
  136.     #error Please use the /MD switch (multithreaded DLL C-runtime)
  137. #endif
  138. #endif
  139.  
  140. /////////////////////////////////////////////////////////////////////////////
  141. // special include files
  142.  
  143. #include <afxv_w32.h>
  144.  
  145. // Include any non-Intel platform specific items
  146. #ifndef _X86_
  147.     #include <afxv_cpu.h>
  148. #endif
  149.  
  150. // Include any non-Windows OS-specific items
  151. #ifdef _MAC
  152.     #include <afxv_mac.h>
  153. #endif
  154.  
  155. #if defined(_X86_) || defined(_MAC)
  156.     #define _AFX_MINREBUILD
  157. #endif
  158.  
  159. #if defined(_CUSTOM) || defined (__BORLANDC__)
  160. // Put any custom configuration items in afxv_cfg.h
  161.     #include <afxv_cfg.h>
  162. #endif
  163.  
  164. // setup default packing value
  165. #ifndef _AFX_PACKING
  166.     #define _AFX_PACKING    4   // default packs structs at 4 bytes
  167. #endif
  168.  
  169. #ifdef _AFXDLL
  170.     #include <afxv_dll.h>
  171. #else
  172.     #define _AFX_NO_OCX_SUPPORT
  173. #endif
  174.  
  175. // Define this virtual key for use by status bar
  176. #ifndef VK_KANA
  177. #define VK_KANA             0x15
  178. #endif
  179.  
  180. /////////////////////////////////////////////////////////////////////////////
  181. // Special AfxDebugBreak: used to break into debugger at critical times
  182.  
  183. #ifndef AfxDebugBreak
  184. #ifdef _AFX_NO_DEBUG_CRT
  185. // by default, debug break is asm int 3, or a call to DebugBreak, or nothing
  186. #if defined(_M_IX86) && !defined(_AFX_PORTABLE)
  187. #define AfxDebugBreak() _asm { int 3 }
  188. #else
  189. #define AfxDebugBreak() DebugBreak()
  190. #endif
  191. #else
  192. #define AfxDebugBreak() _CrtDbgBreak()
  193. #endif
  194. #endif
  195.  
  196. #ifndef _DEBUG
  197. #ifdef AfxDebugBreak
  198. #undef AfxDebugBreak
  199. #endif
  200. #define AfxDebugBreak()
  201. #endif  // _DEBUG
  202.  
  203. /////////////////////////////////////////////////////////////////////////////
  204. // Standard preprocessor symbols if not already defined
  205. /////////////////////////////////////////////////////////////////////////////
  206.  
  207. // SIZE_T_MAX is used by the collection classes
  208. #ifndef SIZE_T_MAX
  209.     #define SIZE_T_MAX  UINT_MAX
  210. #endif
  211.  
  212. // PASCAL is used for static member functions
  213. #ifndef PASCAL
  214.     #define PASCAL
  215. #endif
  216.  
  217. // CDECL and EXPORT are defined in case WINDOWS.H doesn't
  218. #ifndef CDECL
  219.     #define CDECL __cdecl
  220. #endif
  221.  
  222. #ifndef EXPORT
  223.     #define EXPORT
  224. #endif
  225.  
  226. // UNALIGNED is used for unaligned data access (in CArchive mostly)
  227. #ifndef UNALIGNED
  228.     #define UNALIGNED
  229. #endif
  230.  
  231. // AFXAPI is used on global public functions
  232. #ifndef AFXAPI
  233.     #define AFXAPI __stdcall
  234. #endif
  235.  
  236. // AFXOLEAPI is used for some special OLE functions
  237. #ifndef AFXOLEAPI
  238.     #define AFXOLEAPI __stdcall
  239. #endif
  240.  
  241. // AFX_CDECL is used for rare functions taking variable arguments
  242. #ifndef AFX_CDECL
  243.     #define AFX_CDECL __cdecl
  244. #endif
  245.  
  246. // AFX_EXPORT is used for functions which need to be exported
  247. #ifndef AFX_EXPORT
  248.     #define AFX_EXPORT EXPORT
  249. #endif
  250.  
  251. // The following macros are used to enable export/import
  252.  
  253. // for data
  254. #ifndef AFX_DATA_EXPORT
  255.     #define AFX_DATA_EXPORT __declspec(dllexport)
  256. #endif
  257. #ifndef AFX_DATA_IMPORT
  258.     #define AFX_DATA_IMPORT __declspec(dllimport)
  259. #endif
  260.  
  261. // for classes
  262. #ifndef AFX_CLASS_EXPORT
  263.     #define AFX_CLASS_EXPORT __declspec(dllexport)
  264. #endif
  265. #ifndef AFX_CLASS_IMPORT
  266.     #define AFX_CLASS_IMPORT __declspec(dllimport)
  267. #endif
  268.  
  269. // for global APIs
  270. #ifndef AFX_API_EXPORT
  271.     #define AFX_API_EXPORT __declspec(dllexport)
  272. #endif
  273. #ifndef AFX_API_IMPORT
  274.     #define AFX_API_IMPORT __declspec(dllimport)
  275. #endif
  276.  
  277. // The following macros are used on data declarations/definitions
  278. //  (they are redefined for extension DLLs and the shared MFC DLL)
  279. #define AFX_DATA
  280. #define AFX_DATADEF
  281.  
  282. // used when building the "core" MFC40.DLL
  283. #ifndef AFX_CORE_DATA
  284.     #define AFX_CORE_DATA
  285.     #define AFX_CORE_DATADEF
  286. #endif
  287.  
  288. // used when building the MFC/OLE support MFCO40.DLL
  289. #ifndef AFX_OLE_DATA
  290.     #define AFX_OLE_DATA
  291.     #define AFX_OLE_DATADEF
  292. #endif
  293.  
  294. // used when building the MFC/DB support MFCD40.DLL
  295. #ifndef AFX_DB_DATA
  296.     #define AFX_DB_DATA
  297.     #define AFX_DB_DATADEF
  298. #endif
  299.  
  300. // used when building the MFC/NET support MFCN40.DLL
  301. #ifndef AFX_NET_DATA
  302.     #define AFX_NET_DATA
  303.     #define AFX_NET_DATADEF
  304. #endif
  305.  
  306. // used when building extension DLLs
  307. #ifndef AFX_EXT_DATA
  308.     #define AFX_EXT_DATA
  309.     #define AFX_EXT_DATADEF
  310.     #define AFX_EXT_CLASS
  311.     #define AFX_EXT_API
  312. #endif
  313.  
  314. // BASED_XXXX macros are provided for backward compatibility
  315. #ifndef BASED_CODE
  316.     #define BASED_CODE
  317. #endif
  318.  
  319. #ifndef BASED_DEBUG
  320.     #define BASED_DEBUG
  321. #endif
  322.  
  323. #ifndef BASED_STACK
  324.     #define BASED_STACK
  325. #endif
  326.  
  327. // setup default code segment
  328. #ifdef AFX_DEF_SEG
  329.     #pragma code_seg(AFX_DEF_SEG)
  330. #endif
  331.  
  332. /////////////////////////////////////////////////////////////////////////////
  333.