home *** CD-ROM | disk | FTP | other *** search
/ Building OCXs / Building_OCXs_Que_1995.iso / code / ch07 / contview.h < prev    next >
C/C++ Source or Header  |  1995-01-15  |  2KB  |  67 lines

  1. // contview.h : interface of the CContView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CContCntrItem;
  6.  
  7. class CContView : public CView
  8. {
  9. protected: // create from serialization only
  10.     CContView();
  11.     DECLARE_DYNCREATE(CContView)
  12.  
  13. // Attributes
  14. public:
  15.     CContDoc* GetDocument();
  16.     // m_pSelection holds the selection to the current CContCntrItem.
  17.     // For many applications, such a member variable isn't adequate to
  18.     //  represent a selection, such as a multiple selection or a selection
  19.     //  of objects that are not CContCntrItem objects.  This selection
  20.     //  mechanism is provided just to help you get started.
  21.  
  22.     // TODO: replace this selection mechanism with one appropriate to your app.
  23.     CContCntrItem* m_pSelection;
  24.  
  25. // Operations
  26. public:
  27.  
  28. // Overrides
  29.     // ClassWizard generated virtual function overrides
  30.     //{{AFX_VIRTUAL(CContView)
  31.     public:
  32.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  33.     protected:
  34.     virtual void OnInitialUpdate(); // called first time after construct
  35.     virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
  36.     //}}AFX_VIRTUAL
  37.  
  38. // Implementation
  39. public:
  40.     virtual ~CContView();
  41. #ifdef _DEBUG
  42.     virtual void AssertValid() const;
  43.     virtual void Dump(CDumpContext& dc) const;
  44. #endif
  45.  
  46. protected:
  47.  
  48. // Generated message map functions
  49. protected:
  50.     //{{AFX_MSG(CContView)
  51.         // NOTE - the ClassWizard will add and remove member functions here.
  52.         //    DO NOT EDIT what you see in these blocks of generated code !
  53.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  54.     afx_msg void OnSize(UINT nType, int cx, int cy);
  55.     afx_msg void OnInsertObject();
  56.     afx_msg void OnCancelEditCntr();
  57.     //}}AFX_MSG
  58.     DECLARE_MESSAGE_MAP()
  59. };
  60.  
  61. #ifndef _DEBUG  // debug version in contview.cpp
  62. inline CContDoc* CContView::GetDocument()
  63.    { return (CContDoc*)m_pDocument; }
  64. #endif
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.