// MultiTerminal1Dlg.h: 头文件 // #pragma once // CMultiTerminal1Dlg 对话框 class CMultiTerminal1Dlg : public CDialogEx { // 构造 public: CMultiTerminal1Dlg(CWnd* pParent = nullptr); // 标准构造函数 // 对话框数据 #ifdef AFX_DESIGN_TIME enum { IDD = IDD_MULTITERMINAL1_DIALOG }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 CStatusBar m_wndStatusBar; CToolBar m_wndToolBar; CImageList m_ColorTreeImages; CTreeCtrl m_treectrl1; // 实现 protected: HICON m_hIcon; // 生成的消息映射函数 virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() virtual BOOL PreTranslateMessage(MSG* pMsg); afx_msg void OnClose(); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnTimer(UINT_PTR nIDEvent); void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex, BOOL bSysMenu); //显示toolbar afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData); void FindComPort(); int BInited; int m_bResourceOpened; int m_bPause; CString sComSelStr; CString sBaudSelStr; DWORD dComNum; volatile int MyThreadProc1ToRun = 0; volatile int MyThreadProc1Running = 0; CRect MainClientRect; CRect LeftRect; CRect RightRect; CRect ItemRect; CRect OrgButtonRect; CRect ButtonRect; CRect PicRect; CRect PicRectUp; CRect PicRectDown; CRect LogRect; int calLayerOuts(); int DisplayParams(); int GetParams(); int DelayInit(); int LoadResourceList(); int SaveResourceList(); int LoadModel(); int SaveModel(); int OpenResource(CStringA ResourceStr); int CloseResource(); int SaveData(CString sFilePathName); int LoadData(CString sFilePathName); int MonitorPLC(); int UpdateDataDisplay(); public: static UINT MyJumper1(LPVOID pParam); DWORD WINAPI MyThreadProc1(LPVOID pParam); bool m_bOnline = false; bool m_bRunning = false; bool m_bMonitoring = false; // Combo Com port select CComboBox m_combo_comport; // Combo Com Baud select CComboBox m_combo_com_baud; afx_msg void OnBnClickedButtonStart(); afx_msg void OnBnClickedButtonStop(); afx_msg void OnBnClickedButtonClrscr(); afx_msg void OnBnClickedButtonSend(); CEdit m_edit_display; // Combo Input CComboBox m_combo_input; afx_msg void OnCbnEditchangeComboInput(); afx_msg void OnCbnSelchangeComboRes(); afx_msg void OnBnClickedButtonDo(); afx_msg void OnCbnSelchangeComboCmdType(); afx_msg void OnCbnSelchangeComboDcount(); afx_msg void OnBnClickedButtonStartBulkTest(); afx_msg void OnBnClickedButtonStopBulkTest(); afx_msg void OnMenuDownload(); afx_msg void OnMenuUpload(); afx_msg void OnMenuOnline(); afx_msg void OnMenuOffline(); afx_msg void OnMenuMonitor(); afx_msg void OnMenuRun(); afx_msg void OnUpdateMenuRun(CCmdUI *pCmdUI); afx_msg void OnUpdateMenuMonitor(CCmdUI *pCmdUI); afx_msg void OnUpdateMenuOffline(CCmdUI *pCmdUI); afx_msg void OnUpdateMenuOnline(CCmdUI *pCmdUI); CEdit m_edit_mon1; CEdit m_edit_mon2; afx_msg void OnMenuCommset(); afx_msg void OnMenuSysregSet(); afx_msg void OnMenuStatusShow(); afx_msg void OnMenuInfoDisplay(); afx_msg void OnMenuCoilMon(); afx_msg void OnMenuDataMon(); afx_msg void OnMenuCommTool(); afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); afx_msg void OnBnClickedButtonClearStat(); int Clear_COM_Stats(); afx_msg void OnBnClickedButtonRead(); afx_msg void OnBnClickedButtonConnect(); afx_msg void OnMenuEventLog(); afx_msg void OnMenuCommTest(); afx_msg void OnMenuForceIo(); afx_msg void OnMenuDatetime(); };