home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c10 / lab02 / baseline / mdbview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.8 KB  |  67 lines

  1. // MDBView.h : interface of the CMDBView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CMDBView : public CTreeView
  6. {
  7. protected: // create from serialization only
  8.     void SetModified();
  9.     CMDBView();
  10.     DECLARE_DYNCREATE(CMDBView)
  11.  
  12. // Attributes
  13. public:
  14.     HTREEITEM FieldInfoIterator( CString & strFieldName, 
  15.                                 int & nFieldType, 
  16.                                 int & nTextFieldLength,
  17.                                 HTREEITEM hTable = NULL );
  18.     HTREEITEM TableNameIterator( CString & str, BOOLEAN bReset = FALSE );
  19.     CMDBDoc* GetDocument();
  20.  
  21. // Operations
  22. public:
  23.  
  24. // Overrides
  25.     // ClassWizard generated virtual function overrides
  26.     //{{AFX_VIRTUAL(CMDBView)
  27.     public:
  28.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  29.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  30.     protected:
  31.     virtual void OnInitialUpdate(); // called first time after construct
  32.     //}}AFX_VIRTUAL
  33.  
  34. // Implementation
  35. public:
  36.     virtual ~CMDBView();
  37. #ifdef _DEBUG
  38.     virtual void AssertValid() const;
  39.     virtual void Dump(CDumpContext& dc) const;
  40. #endif
  41.  
  42. protected:
  43.  
  44. // Generated message map functions
  45. protected:
  46.     //{{AFX_MSG(CMDBView)
  47.     afx_msg void OnEndlabeledit(NMHDR* pNMHDR, LRESULT* pResult);
  48.     afx_msg void OnBeginlabeledit(NMHDR* pNMHDR, LRESULT* pResult);
  49.     afx_msg void OnFileTable();
  50.     afx_msg void OnFileField();
  51.     afx_msg void OnUpdateFileField(CCmdUI* pCmdUI);
  52.     afx_msg void OnUpdateFileFieldDelete(CCmdUI* pCmdUI);
  53.     afx_msg void OnUpdateFileTableDelete(CCmdUI* pCmdUI);
  54.     afx_msg void OnFileTableDelete();
  55.     afx_msg void OnFileFieldDelete();
  56.     afx_msg void OnEditSelectedItem();
  57.     //}}AFX_MSG
  58.     DECLARE_MESSAGE_MAP()
  59. };
  60.  
  61. #ifndef _DEBUG  // debug version in MDBView.cpp
  62. inline CMDBDoc* CMDBView::GetDocument()
  63.    { return (CMDBDoc*)m_pDocument; }
  64. #endif
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.