home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c08 / lab02 / ex02 / employeeview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  2.3 KB  |  81 lines

  1. // EmployeeView.h : interface of the CEmployeeView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_EMPLOYEEVIEW_H__E708A686_460C_11D0_9C9D_00A0D100E3C8__INCLUDED_)
  6. #define AFX_EMPLOYEEVIEW_H__E708A686_460C_11D0_9C9D_00A0D100E3C8__INCLUDED_
  7.  
  8. class CEmployeePaySet;
  9.  
  10. class CEmployeeView : public CDaoRecordView
  11. {
  12. protected: // create from serialization only
  13.     CEmployeeView();
  14.     DECLARE_DYNCREATE(CEmployeeView)
  15.  
  16. public:
  17.     //{{AFX_DATA(CEmployeeView)
  18.     enum { IDD = IDD_EMPLOYEE_FORM };
  19.     CEmployeePaySet* m_pSet;
  20.     CEmployeePersonalSet* m_pEmplInfoSet;
  21.     //}}AFX_DATA
  22.  
  23. // Attributes
  24. public:
  25.     CEmployeeDoc* GetDocument();
  26.  
  27. // Operations
  28. public:
  29.  
  30. // Overrides
  31.     // ClassWizard generated virtual function overrides
  32.     //{{AFX_VIRTUAL(CEmployeeView)
  33.     public:
  34.     virtual CDaoRecordset* OnGetRecordset();
  35.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  36.     virtual BOOL OnMove(UINT nIDMoveCommand);
  37.     protected:
  38.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  39.     virtual void OnInitialUpdate(); // called first time after construct
  40.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  41.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  42.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  43.     //}}AFX_VIRTUAL
  44.  
  45. // Implementation
  46. public:
  47.     void AddRecordCancel();
  48.     void SetAddMode(BOOL bAddMode = TRUE);
  49.     virtual ~CEmployeeView();
  50. #ifdef _DEBUG
  51.     virtual void AssertValid() const;
  52.     virtual void Dump(CDumpContext& dc) const;
  53. #endif
  54.  
  55. protected:
  56.  
  57. // Generated message map functions
  58. protected:
  59.     BOOL m_bAddMode;
  60.     //{{AFX_MSG(CEmployeeView)
  61.     afx_msg void OnRecordAdd();
  62.     afx_msg void OnRecordDelete();
  63.     afx_msg void OnUpdateRecordDelete(CCmdUI* pCmdUI);
  64.     afx_msg void OnRecordClear();
  65.     afx_msg void OnUpdateRecordAdd(CCmdUI* pCmdUI);
  66.     //}}AFX_MSG
  67.     DECLARE_MESSAGE_MAP()
  68. };
  69.  
  70. #ifndef _DEBUG  // debug version in EmployeeView.cpp
  71. inline CEmployeeDoc* CEmployeeView::GetDocument()
  72.    { return (CEmployeeDoc*)m_pDocument; }
  73. #endif
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76.  
  77. //{{AFX_INSERT_LOCATION}}
  78. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  79.  
  80. #endif // !defined(AFX_EMPLOYEEVIEW_H__E708A686_460C_11D0_9C9D_00A0D100E3C8__INCLUDED_)
  81.