#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 // MFC基础 #include // MFC 核心组件和标准组件 #include // MFC 扩展 #include // MFC 自动化类 #include // Socket TCP #ifndef _AFX_NO_OLE_SUPPORT #include // MFC 对 Internet Explorer 4 公共控件的支持 #endif #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC 对 Windows 公共控件的支持 #endif // _AFX_NO_AFXCMN_SUPPORT #include // MFC 支持功能区和控制条 #include #include // 通用对话框 #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 CEquipTypeList; class CTaskRecord; typedef CTypedPtrList CTaskRecordList; class EquipData; typedef CTypedPtrList CDataList; class EquipDataPoint; typedef CTypedPtrList CPointList; class EquipDataPlane; typedef CTypedPtrList CPlaneList; class EquipDataCircle; typedef CTypedPtrList CCircleList; class EquipDataLine; typedef CTypedPtrList CLineList; class EquipDataCylinder; typedef CTypedPtrList CCylinderList; class EquipDataAngle; typedef CTypedPtrList CAngleList; class EquipDataPointRelated; typedef CTypedPtrList CPointRelatedList; class PostureDataAngle; typedef CTypedPtrList CPostureAngleList; class PostureDataPoint; typedef CTypedPtrList 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