snmp_cwdmView.h
上传用户:lvjun8202
上传日期:2013-04-30
资源大小:797k
文件大小:3k
源码类别:

SNMP编程

开发平台:

C/C++

  1. // snmp_cwdmView.h : interface of the CSnmp_cwdmView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_SNMP_CWDMVIEW_H__AD4137B9_AC01_4EBF_A1FB_907E9AF725FD__INCLUDED_)
  5. #define AFX_SNMP_CWDMVIEW_H__AD4137B9_AC01_4EBF_A1FB_907E9AF725FD__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CSnmp_cwdmView : public CTreeView
  10. {
  11. protected: // create from serialization only
  12. CSnmp_cwdmView();
  13. DECLARE_DYNCREATE(CSnmp_cwdmView)
  14. // Attributes
  15. public:
  16. COAMDoc* GetDocument();
  17. // Operations
  18. public:
  19. // Overrides
  20. // ClassWizard generated virtual function overrides
  21. //{{AFX_VIRTUAL(CSnmp_cwdmView)
  22. public:
  23. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  24. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  25. virtual void Serialize(CArchive& ar);
  26. protected:
  27. virtual void OnInitialUpdate(); // called first time after construct
  28. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  29. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  30. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  31. //}}AFX_VIRTUAL
  32. // Implementation
  33. public:
  34. virtual ~CSnmp_cwdmView();
  35. #ifdef _DEBUG
  36. virtual void AssertValid() const;
  37. virtual void Dump(CDumpContext& dc) const;
  38. #endif
  39. protected:
  40. HTREEITEM m_hItems[100];
  41. int m_nIndex;
  42. /* void ReadTreeViewContent(CArchive& ar, CTreeCtrl& refCtrl);
  43. void RecursiveWriteItems(CArchive& ar, CTreeCtrl& refCtrl, HTREEITEM hItem);
  44. void WriteTreeViewContent(CArchive& ar, CTreeCtrl& refCtrl);*/
  45.     BOOL GetFullPath(HTREEITEM hItem,CString &str, CString &str_oid);
  46. enum { recordRegular, recordData,recordPush, recordPop };
  47. // Generated message map function
  48. public:
  49. void ReadTreeViewContent(CArchive& ar, CTreeCtrl& refCtrl);
  50. void RecursiveWriteItems(CArchive& ar, CTreeCtrl& refCtrl, HTREEITEM hItem);
  51. void WriteTreeViewContent(CArchive& ar, CTreeCtrl& refCtrl);
  52. protected:
  53. //{{AFX_MSG(CSnmp_cwdmView)
  54. afx_msg void OnNewitem();
  55. afx_msg void OnDelete();
  56. afx_msg void OnSize(UINT nType, int cx, int cy);
  57. afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
  58. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  59. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  60. //}}AFX_MSG
  61. DECLARE_MESSAGE_MAP()
  62. };
  63. #ifndef _DEBUG  // debug version in snmp_cwdmView.cpp
  64. inline CSnmp_cwdmDoc* CSnmp_cwdmView::GetDocument()
  65.    { return (CSnmp_cwdmDoc*)m_pDocument; }
  66. #endif
  67. /////////////////////////////////////////////////////////////////////////////
  68. //{{AFX_INSERT_LOCATION}}
  69. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  70. #endif // !defined(AFX_SNMP_CWDMVIEW_H__AD4137B9_AC01_4EBF_A1FB_907E9AF725FD__INCLUDED_)