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

  1. // QueryDefView.h : interface of the CQueryDefView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CQueryDefSet;
  6.  
  7. class CQueryDefView : public CDaoRecordView
  8. {
  9. protected: // create from serialization only
  10.     CQueryDefView();
  11.     DECLARE_DYNCREATE(CQueryDefView)
  12.  
  13. public:
  14.     //{{AFX_DATA(CQueryDefView)
  15.     enum { IDD = IDD_QUERYDEF_FORM };
  16.     CQueryDefSet* m_pSet;
  17.     //}}AFX_DATA
  18.  
  19. // Attributes
  20. public:
  21.     CQueryDefDoc* GetDocument();
  22.  
  23. protected:
  24.     CDaoQueryDef* m_pQueryDef;
  25.     short m_nYear;
  26.  
  27. // Operations
  28. public:
  29.  
  30. // Overrides
  31.     // ClassWizard generated virtual function overrides
  32.     //{{AFX_VIRTUAL(CQueryDefView)
  33.     public:
  34.     virtual CDaoRecordset* OnGetRecordset();
  35.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  36.     protected:
  37.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  38.     virtual void OnInitialUpdate(); // called first time after construct
  39.     //}}AFX_VIRTUAL
  40.  
  41. // Implementation
  42. public:
  43.     virtual ~CQueryDefView();
  44. #ifdef _DEBUG
  45.     virtual void AssertValid() const;
  46.     virtual void Dump(CDumpContext& dc) const;
  47. #endif
  48.  
  49. protected:
  50.  
  51. // Generated message map functions
  52. protected:
  53.     //{{AFX_MSG(CQueryDefView)
  54.     afx_msg void OnQuerydefCreate();
  55.     afx_msg void OnQuerydefExecute();
  56.     afx_msg void OnUpdateQuerydefExecute(CCmdUI* pCmdUI);
  57.     afx_msg void OnQuerydefRemove();
  58.     afx_msg void OnUpdateQuerydefRemove(CCmdUI* pCmdUI);
  59.     afx_msg void OnUpdateQuerydefCreate(CCmdUI* pCmdUI);
  60.     afx_msg void OnDestroy();
  61.     //}}AFX_MSG
  62.     DECLARE_MESSAGE_MAP()
  63. };
  64.  
  65. #ifndef _DEBUG  // debug version in QueryDefView.cpp
  66. inline CQueryDefDoc* CQueryDefView::GetDocument()
  67.    { return (CQueryDefDoc*)m_pDocument; }
  68. #endif
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71.