#pragma once #include "afxcmn.h" #include "ModuleListCtrl.h" class HttpServiceListener; class CRobotClientDlg; class CTransportClientDlg; class CStackerClientDlg; class CModuleProcess; // CAgvMainDialog 对话框 #define WM_SYSTEMTRAY WM_USER+5 class CAgvMainDialog : public CDialogEx { DECLARE_DYNAMIC(CAgvMainDialog) public: CAgvMainDialog(CWnd* pParent = NULL); // 标准构造函数 virtual ~CAgvMainDialog(); // 对话框数据 #ifdef AFX_DESIGN_TIME enum { IDD = IDD_WCS_MAIN_DIALOG }; #endif protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() public: afx_msg LRESULT OnSystemtray(WPARAM wParam, LPARAM lParam); //CTabCtrl m_SubTab; CHttpClient m_httpClient; CDialog *m_pSubDlg[10]; int m_nDebug; //int m_nSubDlg; virtual BOOL OnInitDialog(); HttpServiceListener *httpServerListener; CHttpService httpService; BOOL StartHttpServer(); afx_msg void OnTrayShow(); afx_msg void OnTrayExit(); void InitModule(); void RefresModuleShow(); std::map m_mapAllNormal; CModuleProcess* GetModuleByName(CString strName); CString UTF8ToMultiByte(const std::string& utf8String); private: NOTIFYICONDATA NotifyIcon; //系统托盘类 public: afx_msg void OnClose(); CModuleListCtrl m_ModuleListCtrl; afx_msg void OnNMRClickListModule(NMHDR *pNMHDR, LRESULT *pResult); LRESULT OnUpdateModule(WPARAM wparam, LPARAM lparam); afx_msg void OnNMDblclkListModule(NMHDR *pNMHDR, LRESULT *pResult); void KillProcess(CString sExeName); CEdit m_EditMultiLine; void AddLog2Edit(CString strMsg); };