home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n04 / olecont.exe / CONTITEM.H < prev    next >
C/C++ Source or Header  |  1995-04-01  |  2KB  |  60 lines

  1. // contitem.h : interface of the CContainerItem class
  2. //
  3.  
  4. class CContainerDoc;
  5. class CContainerView;
  6.  
  7. class CContainerItem : public CControlItem
  8. {
  9.     DECLARE_SERIAL(CContainerItem)
  10.  
  11. // Constructors
  12. public:
  13.     CContainerItem(CContainerDoc* 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.     // Document and view attributes
  22.     CContainerDoc* GetDocument()
  23.         { return (CContainerDoc*)COleClientItem::GetDocument(); }
  24.     CContainerView* GetActiveView()
  25.         { return (CContainerView*)COleClientItem::GetActiveView(); }
  26.  
  27.     // Size Attributes
  28.     CRect        m_rect;
  29.     CSize        m_extent;
  30.  
  31. // Operations
  32. public:
  33.     void Move(CRect &rc);
  34.     BOOL UpdateExtent();
  35.     void Invalidate(CView* pNotThisView = NULL);
  36.     BOOL UpdateItemExtentFromServer();
  37.  
  38.     // ClassWizard generated virtual function overrides
  39.     //{{AFX_VIRTUAL(CContainerItem)
  40.     public:
  41.     virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
  42.     protected:
  43.     virtual void OnGetItemPosition(CRect& rPosition);
  44.     virtual void OnDeactivateUI(BOOL bUndoable);
  45.     virtual BOOL OnChangeItemPosition(const CRect& rectPos);
  46.     virtual void OnUpdateFrameTitle();
  47.     //}}AFX_VIRTUAL
  48.  
  49. // Implementation
  50. public:
  51.     ~CContainerItem();
  52. #ifdef _DEBUG
  53.     virtual void AssertValid() const;
  54.     virtual void Dump(CDumpContext& dc) const;
  55. #endif
  56.     virtual void Serialize(CArchive& ar);
  57. };
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60.