// CntrItem.hpp : interface of the CMFCApplicationCntrItem class // #pragma once class CMFCApplicationDoc; class CMFCApplicationView; class CMFCApplicationCntrItem : public COleClientItem { DECLARE_SERIAL(CMFCApplicationCntrItem) // Constructors public: CMFCApplicationCntrItem(CMFCApplicationDoc* 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: CMFCApplicationDoc* GetDocument() { return reinterpret_cast(COleClientItem::GetDocument()); } CMFCApplicationView* GetActiveView() { return reinterpret_cast(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); virtual BOOL CanActivate(); // Implementation public: ~CMFCApplicationCntrItem(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif virtual void Serialize(CArchive& ar); };