home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c08 / dynalist / dlview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.6 KB  |  64 lines

  1. // DynaListView.h : interface of the CDynaListView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CDynaListView : public CListView
  6. {
  7. protected: // create from serialization only
  8.     CDynaListView();
  9.     DECLARE_DYNCREATE(CDynaListView)
  10.  
  11. // Attributes
  12. public:
  13.     CDynaListDoc* GetDocument();
  14.  
  15. protected:
  16.     CDaoRecordset* m_pSet;
  17.     CDaoDatabase* m_pDatabase;
  18.  
  19. // Operations
  20. public:
  21.  
  22. // Overrides
  23.     // ClassWizard generated virtual function overrides
  24.     //{{AFX_VIRTUAL(CDynaListView)
  25.     public:
  26.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  27.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  28.     protected:
  29.     virtual void OnInitialUpdate(); // called first time after construct
  30.     //}}AFX_VIRTUAL
  31.  
  32. protected:
  33.     void CDynaListView::DeleteListViewData();
  34.     BOOL FillListViewEntries(int nRecords);
  35.     BOOL FillListViewHeaders(int cx);
  36.     
  37. // Implementation
  38. public:
  39.     virtual ~CDynaListView();
  40. #ifdef _DEBUG
  41.     virtual void AssertValid() const;
  42.     virtual void Dump(CDumpContext& dc) const;
  43. #endif
  44.  
  45. protected:
  46.  
  47. // Generated message map functions
  48. protected:
  49.     //{{AFX_MSG(CDynaListView)
  50.     afx_msg void OnFileOpen();
  51.     afx_msg void OnFileClose();
  52.     afx_msg void OnUpdateFileClose(CCmdUI* pCmdUI);
  53.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  54.     //}}AFX_MSG
  55.     DECLARE_MESSAGE_MAP()
  56. };
  57.  
  58. #ifndef _DEBUG  // debug version in DynaListView.cpp
  59. inline CDynaListDoc* CDynaListView::GetDocument()
  60.    { return (CDynaListDoc*)m_pDocument; }
  61. #endif
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64.