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

  1. // BiblioView.h : interface of the CBiblioView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CBiblioSet;
  6.  
  7. class CBiblioView : public CDaoRecordView
  8. {
  9. protected: // create from serialization only
  10.     CBiblioView();
  11.     DECLARE_DYNCREATE(CBiblioView)
  12.  
  13. public:
  14.     //{{AFX_DATA(CBiblioView)
  15.     enum { IDD = IDD_BIBLIO_FORM };
  16.     CBiblioSet* m_pSet;
  17.     //}}AFX_DATA
  18.  
  19. // Attributes
  20. public:
  21.     CBiblioDoc* GetDocument();
  22.  
  23. protected:
  24.     BOOL m_bOnRecordAdd;
  25.     BOOL m_bTransact;
  26.     int m_nTransactions;
  27.     COleVariant m_LastBookmark;
  28.  
  29. // Operations
  30. public:
  31.  
  32. // Overrides
  33.     // ClassWizard generated virtual function overrides
  34.     //{{AFX_VIRTUAL(CBiblioView)
  35.     public:
  36.     virtual CDaoRecordset* OnGetRecordset();
  37.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  38.     protected:
  39.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  40.     virtual void OnInitialUpdate(); // called first time after construct
  41.     //}}AFX_VIRTUAL
  42.  
  43. // Implementation
  44. public:
  45.     virtual ~CBiblioView();
  46. #ifdef _DEBUG
  47.     virtual void AssertValid() const;
  48.     virtual void Dump(CDumpContext& dc) const;
  49. #endif
  50.  
  51. protected:
  52.     virtual BOOL OnMove( UINT nIDMoveCommand );
  53.  
  54. // Generated message map functions
  55. protected:
  56.     //{{AFX_MSG(CBiblioView)
  57.     afx_msg void OnRecordAdd();
  58.     afx_msg void OnUpdateRecordAdd(CCmdUI* pCmdUI);
  59.     afx_msg void OnRecordDelete();
  60.     afx_msg void OnUpdateRecordDelete(CCmdUI* pCmdUI);
  61.     afx_msg void OnTransactBegin();
  62.     afx_msg void OnUpdateTransactBegin(CCmdUI* pCmdUI);
  63.     afx_msg void OnTransactCommit();
  64.     afx_msg void OnUpdateTransactCommit(CCmdUI* pCmdUI);
  65.     afx_msg void OnTransactRollback();
  66.     afx_msg void OnUpdateTransactRollback(CCmdUI* pCmdUI);
  67.     afx_msg void OnRecordEdit();
  68.     afx_msg void OnUpdateRecordEdit(CCmdUI* pCmdUI);
  69.     //}}AFX_MSG
  70.     afx_msg void OnUpdateIndicatorTransact(CCmdUI* pCmdUI);
  71.     DECLARE_MESSAGE_MAP()
  72. };
  73.  
  74. #ifndef _DEBUG  // debug version in BiblioView.cpp
  75. inline CBiblioDoc* CBiblioView::GetDocument()
  76.    { return (CBiblioDoc*)m_pDocument; }
  77. #endif
  78.  
  79. /////////////////////////////////////////////////////////////////////////////
  80.