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

  1. // sectform.h : interface of the CSectionForm class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. class CSectionSet;
  14.  
  15. class CSectionForm : public CRecordView
  16. {
  17. protected: // create from serialization only
  18.     CSectionForm();
  19.     DECLARE_DYNCREATE(CSectionForm)
  20.  
  21. public:
  22.     //{{AFX_DATA(CSectionForm)
  23.     enum { IDD = IDD_ENROLL_FORM };
  24.     CStatic m_staticLast;
  25.     CEdit   m_editLast;
  26.     CEdit   m_ctlSection;
  27.     CComboBox   m_ctlCourseList;
  28.     CSectionSet* m_pSet;
  29.     //}}AFX_DATA
  30. // Attributes
  31. public:
  32.     CEnrollDoc* GetDocument();
  33. protected:
  34.     BOOL m_bAddMode;
  35.  
  36.     // For dynamically added columns
  37.     CObList m_listEdit;
  38.     CObList m_listStatic;
  39.  
  40.     // For edit control placement
  41.     CRect m_rc;
  42.     UINT m_nOffset;
  43.  
  44.     // For static control (label) placement
  45.     CRect m_rcStatic;
  46.  
  47. // Operations
  48. public:
  49.     virtual CRecordset* OnGetRecordset();
  50.     virtual BOOL OnMove(UINT nIDMoveCommand);
  51.  
  52. // Implementation
  53. public:
  54.     virtual ~CSectionForm();
  55. #ifdef _DEBUG
  56.     virtual void AssertValid() const;
  57.     virtual void Dump(CDumpContext& dc) const;
  58. #endif
  59.  
  60. protected:
  61.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  62.     virtual void OnInitialUpdate(); // called first time after construct
  63.  
  64.     // Printing support
  65.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  66.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  67.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  68.  
  69. // Generated message map functions
  70. protected:
  71.     //{{AFX_MSG(CSectionForm)
  72.     afx_msg void OnSelendokCourselist();
  73.     afx_msg void OnRecordAdd();
  74.     afx_msg void OnRecordRefresh();
  75.     afx_msg void OnRecordDelete();
  76.     //}}AFX_MSG
  77.     afx_msg void OnOptionsAddfields();
  78.     DECLARE_MESSAGE_MAP()
  79. };
  80.  
  81. #ifndef _DEBUG  // debug version in sectform.cpp
  82. inline CEnrollDoc* CSectionForm::GetDocument()
  83.    { return (CEnrollDoc*)m_pDocument; }
  84. #endif
  85.  
  86.  
  87.  
  88. /////////////////////////////////////////////////////////////////////////////
  89.