home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 December / PCWKCD1296.iso / vjplusb / msdev / bin / ide / mfcapwz.dll / TEMPLATE / VIEW.H < prev   
C/C++ Source or Header  |  1996-07-12  |  4KB  |  128 lines

  1. // $$view_hfile$$.h : interface of the $$VIEW_CLASS$$ class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. $$IF(CONTAINER || CONTAINER_SERVER)
  6. class $$CNTRITEM_CLASS$$;
  7.  
  8. $$ENDIF
  9. $$IF(CRecordView || CDaoRecordView)
  10. class $$RECSET_CLASS$$;
  11.  
  12. $$ENDIF
  13. class $$VIEW_CLASS$$ : public $$VIEW_BASE_CLASS$$
  14. {
  15. protected: // create from serialization only
  16.     $$VIEW_CLASS$$();
  17.     DECLARE_DYNCREATE($$VIEW_CLASS$$)
  18. $$IF(CRecordView || CDaoRecordView || CFormView)
  19.  
  20. public:
  21.     //{{AFX_DATA($$VIEW_CLASS$$)
  22.     enum{ IDD = IDD_$$SAFE_ROOT$$_FORM };
  23. $$IF(CRecordView || CDaoRecordView)
  24.     $$RECSET_CLASS$$* m_pSet;
  25. $$ENDIF
  26.         // NOTE: the ClassWizard will add data members here
  27.     //}}AFX_DATA
  28. $$ENDIF
  29.  
  30. // Attributes
  31. public:
  32.     $$DOC_CLASS$$* GetDocument();
  33. $$IF(CONTAINER || CONTAINER_SERVER)
  34. $$IF(!CRichEditView)
  35. $$IF(VERBOSE)
  36.     // m_pSelection holds the selection to the current $$CNTRITEM_CLASS$$.
  37.     // For many applications, such a member variable isn't adequate to
  38.     //  represent a selection, such as a multiple selection or a selection
  39.     //  of objects that are not $$CNTRITEM_CLASS$$ objects.  This selection
  40.     //  mechanism is provided just to help you get started.
  41.  
  42.     // TODO: replace this selection mechanism with one appropriate to your app.
  43. $$ENDIF //VERBOSE
  44.     $$CNTRITEM_CLASS$$* m_pSelection;
  45. $$ENDIF //!CRichEditView
  46. $$ENDIF //CONTAINERS
  47.  
  48. // Operations
  49. public:
  50.  
  51. // Overrides
  52.     // ClassWizard generated virtual function overrides
  53.     //{{AFX_VIRTUAL($$VIEW_CLASS$$)
  54.     public:
  55. $$IF(CRecordView)
  56.     virtual CRecordset* OnGetRecordset();
  57. $$ENDIF
  58. $$IF(CDaoRecordView)
  59.     virtual CDaoRecordset* OnGetRecordset();
  60. $$ENDIF
  61. $$IF(CFormView || CRecordView || CDaoRecordView)
  62. $$ELIF(!CRichEditView);
  63.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  64. $$ENDIF // !(CFormView || CRecordView || CDaoRecordView)
  65.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  66.     protected:
  67. $$IF(CFormView || CRecordView || CDaoRecordView)
  68.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  69. $$ENDIF //CFormView || CRecordView || CDaoRecordView
  70. $$IF(CScrollView || CONTAINER || CONTAINER_SERVER || CRecordView || CDaoRecordView || CTreeView || CListView)
  71.     virtual void OnInitialUpdate(); // called first time after construct
  72. $$ENDIF
  73. $$IF(PRINT)
  74.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  75. $$IF(!CRichEditView)
  76.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  77.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  78. $$ENDIF //!CRichEditView
  79. $$IF(CFormView)
  80.     virtual void OnPrint(CDC* pDC, CPrintInfo*);
  81. $$ENDIF //CFormView
  82. $$ENDIF //PRINT
  83. $$IF(CONTAINER || CONTAINER_SERVER)
  84. $$IF(!CRichEditView)
  85.     virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
  86. $$ENDIF //!CRichEditView
  87. $$ENDIF //CONTAINER || CONTAINER_SERVER
  88.     //}}AFX_VIRTUAL
  89.  
  90. // Implementation
  91. public:
  92.     virtual ~$$VIEW_CLASS$$();
  93. #ifdef _DEBUG
  94.     virtual void AssertValid() const;
  95.     virtual void Dump(CDumpContext& dc) const;
  96. #endif
  97.  
  98. protected:
  99.  
  100. // Generated message map functions
  101. protected:
  102.     //{{AFX_MSG($$VIEW_CLASS$$)
  103. $$IF(VERBOSE)
  104.         // NOTE - the ClassWizard will add and remove member functions here.
  105.         //    DO NOT EDIT what you see in these blocks of generated code !
  106. $$ENDIF
  107. $$IF(CONTAINER || CONTAINER_SERVER)
  108. $$IF(!CRichEditView)
  109.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  110.     afx_msg void OnSize(UINT nType, int cx, int cy);
  111.     afx_msg void OnInsertObject();
  112.     afx_msg void OnCancelEditCntr();
  113. $$ENDIF //!CRichEditView
  114. $$ENDIF //CONTAINER || CONTAINER_SERVER
  115. $$IF(MINI_SERVER || FULL_SERVER || CONTAINER_SERVER)
  116.     afx_msg void OnCancelEditSrvr();
  117. $$ENDIF //SERVERS
  118.     //}}AFX_MSG
  119.     DECLARE_MESSAGE_MAP()
  120. };
  121.  
  122. #ifndef _DEBUG  // debug version in $$view_ifile$$.cpp
  123. inline $$DOC_CLASS$$* $$VIEW_CLASS$$::GetDocument()
  124.    { return ($$DOC_CLASS$$*)m_pDocument; }
  125. #endif
  126.  
  127. /////////////////////////////////////////////////////////////////////////////
  128.