CNTRITEM.H
上传用户:sesekoo
上传日期:2020-07-18
资源大小:21543k
文件大小:2k
- // cntritem.h : interface of the CDrawItem class
- //
- // This is a part of the Microsoft Foundation Classes C++ library.
- // Copyright (C) 1992-1998 Microsoft Corporation
- // All rights reserved.
- //
- // This source code is only intended as a supplement to the
- // Microsoft Foundation Classes Reference and related
- // electronic documentation provided with the library.
- // See these sources for detailed information regarding the
- // Microsoft Foundation Classes product.
- class CDrawDoc;
- class CDrawView;
- class CDrawItem : public COleClientItem
- {
- DECLARE_SERIAL(CDrawItem)
- // Constructors
- public:
- CDrawItem(CDrawDoc* pContainer = NULL, CDrawOleObj* pDrawObj = 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:
- CDrawDoc* GetDocument()
- { return (CDrawDoc*)COleClientItem::GetDocument(); }
- CDrawView* GetActiveView()
- { return (CDrawView*)COleClientItem::GetActiveView(); }
- CDrawOleObj* m_pDrawObj; // back pointer to OLE draw object
- // Operations
- BOOL UpdateExtent();
- // Implementation
- public:
- ~CDrawItem();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- virtual void Serialize(CArchive& ar);
- virtual void OnGetItemPosition(CRect& rPosition);
- protected:
- virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
- virtual BOOL OnChangeItemPosition(const CRect& rectPos);
- virtual void OnDeactivateUI(BOOL bUndoable);
- virtual void OnActivate();
- };
- /////////////////////////////////////////////////////////////////////////////