// cntritem.h : interface of the CCntrItem class
//

class CContainView;

class CCntrItem : public COleClientItem
{
	DECLARE_SERIAL(CCntrItem)

// Constructors
public:
	CCntrItem(COleDocument* pContainer = NULL);
		// Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
		//  IMPLEMENT_SERIALIZE requires the class have a constructor with
		//  zero arguments.  Normally, OLE items are constructed with a
		//  non-NULL document pointer.

// Attributes
public:
	CRect m_rect;   // position within the document
	COleDocument* GetDocument()
		{ return (COleDocument*)COleClientItem::GetDocument(); }
	CContainView* GetActiveView()
		{ return (CContainView*)COleClientItem::GetActiveView(); }
// Operations
	void InvalidateItem();
	void UpdateFromServerExtent();

	void LoadEmbedding(HGLOBAL hGlobal);
	void LoadEmbedding2();
	void LoadEmbedding3();

// Implementation
public:
	~CCntrItem();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
	virtual void Serialize(CArchive& ar);
	virtual void OnGetItemPosition(CRect& rPosition);
	virtual void OnDeactivateUI(BOOL bUndoable);

protected:
	virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
	virtual BOOL OnChangeItemPosition(const CRect& rectPos);

};

/////////////////////////////////////////////////////////////////////////////
