framework.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "targetver.h"
  3. #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
  4. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 部分 CString 构造函数将是显式的
  5. #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS // 移除对话框中的 MFC 控件支持
  6. #ifndef VC_EXTRALEAN
  7. #define VC_EXTRALEAN // 从 Windows 头文件中排除极少使用的内容
  8. #endif
  9. #include <afx.h>
  10. #include <afxwin.h> // MFC 核心组件和标准组件
  11. #include <afxext.h> // MFC 扩展
  12. #ifndef _AFX_NO_OLE_SUPPORT
  13. #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
  14. #endif
  15. #ifndef _AFX_NO_AFXCMN_SUPPORT
  16. #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
  17. #endif // _AFX_NO_AFXCMN_SUPPORT
  18. #include <iostream>
  19. // Windows 头文件
  20. #include <windows.h>
  21. #include <string>
  22. // 只需要包含一个头文件即可;
  23. #include "opencv2/opencv.hpp"
  24. //在引用gdi的相关头文件前,重新定义min、max;
  25. #ifndef min
  26. #define min
  27. #endif
  28. #ifndef max
  29. #define max
  30. #endif
  31. #include <comutil.h>
  32. #pragma comment(lib,"comsuppw.lib")
  33. #include <gdiplus.h>
  34. #pragma comment(lib, "gdiplus.lib")