home *** CD-ROM | disk | FTP | other *** search
/ BUG 4 / BUGCD1997_05.BIN / aplic / visualj / vjtrial.exe / RCDATA / CABINET / mfcapwz.dll / TEMPLATE / VIEW.H < prev   
C/C++ Source or Header  |  1997-01-28  |  4KB  |  141 lines

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