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

  1. // cntritem.h : interface of the CContCntrItem class
  2. //
  3.  
  4. class CContDoc;
  5. class CContView;
  6.  
  7. class CContCntrItem : public COleClientItem
  8. {
  9.     DECLARE_SERIAL(CContCntrItem)
  10.  
  11. // Constructors
  12. public:
  13.     CContCntrItem(CContDoc* pContainer = NULL);
  14.         // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
  15.         //  IMPLEMENT_SERIALIZE requires the class have a constructor with
  16.         //  zero arguments.  Normally, OLE items are constructed with a
  17.         //  non-NULL document pointer.
  18.  
  19. // Attributes
  20. public:
  21.     CContDoc* GetDocument()
  22.         { return (CContDoc*)COleClientItem::GetDocument(); }
  23.     CContView* GetActiveView()
  24.         { return (CContView*)COleClientItem::GetActiveView(); }
  25.  
  26.     // ClassWizard generated virtual function overrides
  27.     //{{AFX_VIRTUAL(CContCntrItem)
  28.     public:
  29.     virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
  30.     protected:
  31.     virtual void OnGetItemPosition(CRect& rPosition);
  32.     virtual void OnDeactivateUI(BOOL bUndoable);
  33.     virtual BOOL OnChangeItemPosition(const CRect& rectPos);
  34.     //}}AFX_VIRTUAL
  35.  
  36. // Implementation
  37. public:
  38.     ~CContCntrItem();
  39. #ifdef _DEBUG
  40.     virtual void AssertValid() const;
  41.     virtual void Dump(CDumpContext& dc) const;
  42. #endif
  43.     virtual void Serialize(CArchive& ar);
  44. };
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47.