// CntrItem.h : interface of the COContainerCntrItem class
//

#pragma once

class COContainerDoc;
class COContainerView;

class COContainerCntrItem : public COleClientItem
{
	DECLARE_SERIAL(COContainerCntrItem)

// Constructors
public:
	COContainerCntrItem(COContainerDoc* 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:
	COContainerDoc* GetDocument()
		{ return reinterpret_cast<COContainerDoc*>(COleClientItem::GetDocument()); }
	COContainerView* GetActiveView()
		{ return reinterpret_cast<COContainerView*>(COleClientItem::GetActiveView()); }

	public:
	virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
	virtual void OnActivate();
	protected:
	virtual void OnGetItemPosition(CRect& rPosition);
	virtual void OnDeactivateUI(BOOL bUndoable);
	virtual BOOL OnChangeItemPosition(const CRect& rectPos);

// Implementation
public:
	~COContainerCntrItem();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
	virtual void Serialize(CArchive& ar);
};

