| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #pragma once
- #ifndef VC_EXTRALEAN
- #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
- #endif
- #include "targetver.h"
- #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
- // 关闭 MFC 的一些常见且经常可放心忽略的隐藏警告消息
- #define _AFX_ALL_WARNINGS
- #include <afx.h> // MFC基础
- #include <afxwin.h> // MFC 核心组件和标准组件
- #include <afxext.h> // MFC 扩展
- #include <afxdisp.h> // MFC 自动化类
- #include <WS2tcpip.h> // Socket TCP
- #ifndef _AFX_NO_OLE_SUPPORT
- #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
- #endif
- #ifndef _AFX_NO_AFXCMN_SUPPORT
- #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
- #endif // _AFX_NO_AFXCMN_SUPPORT
- #include <afxcontrolbars.h> // MFC 支持功能区和控制条
- #include <atlimage.h>
- #include <afxdlgs.h> // 通用对话框
- #include "resource.h"
- #define WM_START_STATIC WM_USER+101 // 自定义事件:启动静态任务
- #define WM_START_DYNAMIC WM_USER+102 // 自定义事件:启动动态任务
- #define WM_BACK_TO_START WM_USER+103 // 自定义事件:返回开始视图
- #define WM_COMPLETE WM_USER+104 // 自定义事件:IDPMS处理完成
- #define WM_FAILURE WM_USER+105 // 自定义事件:IDPMS处理有错
- #define WM_SUCCESS WM_USER+106 // 自定义事件:IDPMS处理成功
- #define WM_CAMERA WM_USER+107 // 自定义事件:相机标定
- #define WM_STATIC WM_USER+108 // 自定义事件:静态任务
- #define WM_STATIC_DATA WM_USER+116 // 自定义事件:重新获取界面数据
- #define WM_DYNAMIC WM_USER+109 // 自定义事件:动态任务
- #define WM_SINGLE_CAM_CONFIG WM_USER+110 // 自定义线程事件:单相机标定
- #define WM_DOUBLE_CAM_CONFIG_STEP1 WM_USER+111 // 自定义线程事件:双相机外参标定:建立工程
- #define WM_DOUBLE_CAM_CONFIG_STEP2 WM_USER+112 // 自定义线程事件:双相机外参标定
- #define WM_CAM_CONFIG_SUCCESS WM_USER+113 // 相机标定成功
- #define WM_CAM_CONFIG_FAILURE WM_USER+114 // 相机标定失败
- #define WM_START_IDPMS WM_USER+115 //
- #define WM_UPDATE_SUCCESS WM_USER+116 //
- #define WM_UPDATE_FAILURE WM_USER+117 //
- struct PROCESS_INFO
- {
- DWORD dwProcessId;
- HWND hWnd;
- };
- extern CString g_szIDPMSHost;
- extern int g_iIDPMSPort;
- extern DWORD g_dwIDPMSProcessId;
- extern HWND g_hIDPMSHWnd;
- extern CString g_szIDPMSPath;
- extern CString g_szIDPMSWindowTitle;
- extern CString g_szDriveOutputFile;
- extern CString g_szConfigFile;
- extern UINT g_iDBLogOutput;
- extern UINT g_iFindIDPMSType;
- extern BOOL CALLBACK EnumWindowCallBack(HWND hWnd, LPARAM lParam);
- // Text Color
- extern COLORREF g_crInfoText;
- #define IDPMS_MAX_SIZE 20480*3 // IDPMS报文最大长度60K
- #define IDPMS_MAX_DURATION 5000 // 报文返回最大时长5秒
- #define DMS_MSG_SIZE 4096 // DMS消息长度
- // 设备类型列表类型定义
- class CEquipType;
- typedef CTypedPtrList<CObList, CEquipType *> CEquipTypeList;
- class CTaskRecord;
- typedef CTypedPtrList<CObList, CTaskRecord *> CTaskRecordList;
- class EquipData;
- typedef CTypedPtrList<CObList, EquipData*> CDataList;
- class EquipDataPoint;
- typedef CTypedPtrList<CObList, EquipDataPoint*> CPointList;
- class EquipDataPlane;
- typedef CTypedPtrList<CObList, EquipDataPlane*> CPlaneList;
- class EquipDataCircle;
- typedef CTypedPtrList<CObList, EquipDataCircle*> CCircleList;
- class EquipDataLine;
- typedef CTypedPtrList<CObList, EquipDataLine*> CLineList;
- class EquipDataCylinder;
- typedef CTypedPtrList<CObList, EquipDataCylinder*> CCylinderList;
- class EquipDataAngle;
- typedef CTypedPtrList<CObList, EquipDataAngle*> CAngleList;
- class EquipDataPointRelated;
- typedef CTypedPtrList<CObList, EquipDataPointRelated*> CPointRelatedList;
- class PostureDataAngle;
- typedef CTypedPtrList<CObList, PostureDataAngle*> CPostureAngleList;
- class PostureDataPoint;
- typedef CTypedPtrList<CObList, PostureDataPoint*> CPosturePointList;
- #define PI acos(-1)
- // 自定义消息
- typedef struct tag_DMSResponse {
- BOOL bRet;
- int iCode;
- char szMsg[DMS_MSG_SIZE];
- } DMSResponse;
- #ifdef _UNICODE
- #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_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
- #endif
|