home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / tutorial / enroll / step3 / sectform.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  1.8 KB  |  73 lines

  1. // SectForm.h : interface of the CSectionForm class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CSectionSet;
  6.  
  7. class CSectionForm : public CRecordView
  8. {
  9. protected: // create from serialization only
  10.     CSectionForm();
  11.     DECLARE_DYNCREATE(CSectionForm)
  12.  
  13. public:
  14.     //{{AFX_DATA(CSectionForm)
  15.     enum{ IDD = IDD_ENROLL_FORM };
  16.     CEdit   m_ctlSection;
  17.     CComboBox   m_ctlCourseList;
  18.     CSectionSet* m_pSet;
  19.     //}}AFX_DATA
  20.  
  21. // Attributes
  22. public:
  23.     CEnrollDoc* GetDocument();
  24. protected:
  25.     BOOL m_bAddMode;
  26.  
  27. // Operations
  28. public:
  29.  
  30. // Overrides
  31.     // ClassWizard generated virtual function overrides
  32.     //{{AFX_VIRTUAL(CSectionForm)
  33.     public:
  34.     virtual CRecordset* OnGetRecordset();
  35.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  36.     virtual BOOL OnMove(UINT nIDMoveCommand);
  37.  
  38.     protected:
  39.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  40.     virtual void OnInitialUpdate(); // called first time after construct
  41.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  42.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  43.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     virtual ~CSectionForm();
  49. #ifdef _DEBUG
  50.     virtual void AssertValid() const;
  51.     virtual void Dump(CDumpContext& dc) const;
  52. #endif
  53.  
  54. protected:
  55.  
  56. // Generated message map functions
  57. protected:
  58.     //{{AFX_MSG(CSectionForm)
  59.     afx_msg void OnSelendokCourselist();
  60.     afx_msg void OnRecordAdd();
  61.     afx_msg void OnRecordDelete();
  62.     afx_msg void OnRecordRefresh();
  63.     //}}AFX_MSG
  64.     DECLARE_MESSAGE_MAP()
  65. };
  66.  
  67. #ifndef _DEBUG  // debug version in SectForm.cpp
  68. inline CEnrollDoc* CSectionForm::GetDocument()
  69.    { return (CEnrollDoc*)m_pDocument; }
  70. #endif
  71.  
  72. /////////////////////////////////////////////////////////////////////////////
  73.