stdafx.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. // stdafx.h : 标准系统包含文件的包含文件,
  2. // 或是经常使用但不常更改的
  3. // 特定于项目的包含文件
  4. #pragma once
  5. #ifndef _SECURE_ATL
  6. #define _SECURE_ATL 1
  7. #endif
  8. #ifndef VC_EXTRALEAN
  9. #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
  10. #endif
  11. #include "targetver.h"
  12. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
  13. // 关闭 MFC 对某些常见但经常可放心忽略的警告消息的隐藏
  14. #define _AFX_ALL_WARNINGS
  15. #include <afxwin.h> // MFC 核心组件和标准组件
  16. #include <afxext.h> // MFC 扩展
  17. #include <afxdisp.h> // MFC 自动化类
  18. #ifndef _AFX_NO_OLE_SUPPORT
  19. #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
  20. #endif
  21. #ifndef _AFX_NO_AFXCMN_SUPPORT
  22. #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
  23. #endif // _AFX_NO_AFXCMN_SUPPORT
  24. #include <afxcontrolbars.h> // 功能区和控件条的 MFC 支持
  25. #include "..\..\..\repos_main\common\EncodingConversion\EncodingConversion.h"
  26. #include "..\include\iconv.h"
  27. #ifdef USE_STATIC_ICONV // 使用静态库;
  28. #ifndef LIBICONV_EXPORTS
  29. #define LIBICONV_EXPORTS 1
  30. #endif
  31. #ifndef BUILDING_LIBICONV
  32. #define BUILDING_LIBICONV 1
  33. #endif
  34. #ifndef BUILDING_LIBCHARSET
  35. #define BUILDING_LIBCHARSET 1
  36. #endif
  37. #endif
  38. #ifdef USE_STATIC_ICONV // 使用静态库;
  39. // mt
  40. #if defined(_MT) && !defined(_DLL)
  41. #ifdef _DEBUG// mtd;
  42. #pragma comment(lib,"../../../bin/libiconv/libiconv_mtd.lib")
  43. #else // mt;
  44. #pragma comment(lib,"../../../bin/libiconv/libiconv_mt.lib")
  45. #endif
  46. #endif
  47. // md;
  48. #if defined(_MT) && defined(_DLL)
  49. #ifdef _DEBUG // mdd;
  50. #pragma comment(lib,"../../../bin/libiconv/libiconv_mdd.lib")
  51. #else // md;
  52. #pragma comment(lib,"../../../bin/libiconv/libiconv_md.lib")
  53. #endif
  54. #endif
  55. #else // 使用dll的静态连接;
  56. // mt
  57. #if defined(_MT) && !defined(_DLL)
  58. #ifdef _DEBUG// mtd;
  59. #pragma comment(lib,"../../../bin/libiconv/libiconv_mtd.lib")
  60. #else // mt;
  61. #pragma comment(lib,"../../../bin/libiconv/libiconv_mt.lib")
  62. #endif
  63. #endif
  64. // md;
  65. #if defined(_MT) && defined(_DLL)
  66. #ifdef _DEBUG // mdd;
  67. #pragma comment(lib,"../../../bin/libiconv/libiconv_mdd.lib")
  68. #else // md;
  69. #pragma comment(lib,"../../../bin/libiconv/libiconv_md.lib")
  70. #endif
  71. #endif
  72. #endif
  73. //#include <string>
  74. extern int ChangeCode(
  75. const char* pFromCode,
  76. const char* pToCode,
  77. const char* pInBuf,
  78. size_t* iInLen,
  79. char* pOutBuf,
  80. size_t* iOutLen);
  81. extern std::string convert(const char *from, const char* to, const char* inbuf, const size_t &inbufsize);
  82. extern int convert(const char *from, const char *to, char* save, int savelen, char *src, int srclen);
  83. extern std::string convertEx(const char *from, const char* to, const char* inbuf, const size_t &inbufsize);
  84. #ifdef _UNICODE
  85. #if defined _M_IX86
  86. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
  87. #elif defined _M_IA64
  88. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  89. #elif defined _M_X64
  90. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  91. #else
  92. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
  93. #endif
  94. #endif