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

  1. // DBListView.h : header file
  2. //
  3.  
  4. /////////////////////////////////////////////////////////////////////////////
  5. // CDBListView view
  6.  
  7. class CDBListView : public CListView
  8. {
  9. protected:
  10.     CDBListView();           // protected constructor used by dynamic creation
  11.     DECLARE_DYNCREATE(CDBListView)
  12.  
  13. // Attributes
  14. public:
  15.  
  16. protected:
  17.     CListCtrl* m_pListCtrl;
  18.     CBiblioSet* m_pRecordset;
  19.  
  20. // Operations
  21. public:
  22.     CDBAccessDoc* GetDocument(); // non-debug version is inline
  23.  
  24. // Overrides
  25.     // ClassWizard generated virtual function overrides
  26.     //{{AFX_VIRTUAL(CDBListView)
  27.     public:
  28.     virtual void OnInitialUpdate();
  29.     protected:
  30.     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
  31.     //}}AFX_VIRTUAL
  32.  
  33. // Implementation
  34. protected:
  35.     virtual ~CDBListView();
  36. #ifdef _DEBUG
  37.     virtual void AssertValid() const;
  38.     virtual void Dump(CDumpContext& dc) const;
  39. #endif
  40.  
  41.     // Helper functions
  42.     BOOL FillListViewHeaders(int cx);
  43.     BOOL FillListViewEntries(int nRecords);
  44.  
  45.     // Generated message map functions
  46. protected:
  47.     //{{AFX_MSG(CDBListView)
  48.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  49.     afx_msg void OnDestroy();
  50.     //}}AFX_MSG
  51.     afx_msg long OnFillListView(WPARAM nRecords, LPARAM);
  52.  
  53.     DECLARE_MESSAGE_MAP()
  54. };
  55.  
  56. /////////////////////////////////////////////////////////////////////////////
  57.  
  58. #ifndef _DEBUG  // debug version in DBAccessView.cpp
  59. inline CDBAccessDoc* CDBListView::GetDocument()
  60.    { return (CDBAccessDoc*)m_pDocument; }
  61. #endif
  62.  
  63.  
  64.