123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #pragma once
- #include "afxcmn.h"
- #include "btnst.h"
- // CInsertDeviceDlg 对话框
- class CInsertDeviceDlg : public CDialog
- {
- DECLARE_DYNAMIC(CInsertDeviceDlg)
- public:
- CInsertDeviceDlg(CWnd* pParent = NULL); // 标准构造函数
- virtual ~CInsertDeviceDlg();
- CImageList m_imgList;
- CTreeCtrl m_CtrlTree;
- CPoint m_mousePoint;
- // 根结点;
- HTREEITEM hRunRootItem;
- // 设备;
- typedef struct _STDeviceItem
- {
- HTREEITEM hDevice;
- CString strDevice;
- }STDevice,*pSTDevice;
- // 厂家;
- typedef struct _STFactory
- {
- HTREEITEM hFactory;
- CString strFactory;
- vector <STDevice> vtDevice;
- }STFactory,*pSTFactory;
- // 类别;
- typedef struct _STTreeInfo
- {
- HTREEITEM hType;
- CString strType;
- vector <STFactory> vtFactory;
- }STTreeInfo,*pSTTreeInfo;
- // 树信息;
- vector <STTreeInfo> vtSTTreeInfo;
- void InitTreeCtrlInfo();
- void InitSTButtons();
- // 对话框数据
- enum { IDD = DLG_INSERTDEVICE };
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
- DECLARE_MESSAGE_MAP()
- public:
- virtual BOOL OnInitDialog();
- afx_msg void OnBnClickedOk();
- afx_msg void OnBnClickedCancle();
- afx_msg void OnBnClickedModify();
-
- CString m_strName; // 设备名;
- CString m_strPort; // 串口;
- CString m_strAddr; // 地址;
- int m_nStarAddr;
- int m_nEndAddr;
- BOOL m_bMulti;
- BOOL m_bModify;
- CString m_strDepotPath;
- CString m_strRutDepotPath;
- protected:
- virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
- public:
- // afx_msg void OnTvnItemexpandedTree1(NMHDR *pNMHDR, LRESULT *pResult);
- //afx_msg void OnTvnItemexpandingTree1(NMHDR *pNMHDR, LRESULT *pResult);
- CButtonST m_btnClose;
- CButtonST m_btnAdd;
- };
|