cntritem.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:2k
- // [!output CONTAINER_ITEM_HEADER] : interface of the [!output CONTAINER_ITEM_CLASS] class
- //
- #pragma once
- class [!output DOC_CLASS];
- class [!output VIEW_CLASS];
- class [!output CONTAINER_ITEM_CLASS] : public [!output CONTAINER_ITEM_BASE_CLASS]
- {
- DECLARE_SERIAL([!output CONTAINER_ITEM_CLASS])
- // Constructors
- public:
- [!if RICH_EDIT_VIEW]
- [!output CONTAINER_ITEM_CLASS](REOBJECT* preo = NULL, [!output DOC_CLASS]* pContainer = NULL);
- [!else]
- [!output CONTAINER_ITEM_CLASS]([!output DOC_CLASS]* pContainer = NULL);
- [!endif]
- // 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:
- [!output DOC_CLASS]* GetDocument()
- { return reinterpret_cast<[!output DOC_CLASS]*>([!output CONTAINER_ITEM_BASE_CLASS]::GetDocument()); }
- [!output VIEW_CLASS]* GetActiveView()
- { return reinterpret_cast<[!output VIEW_CLASS]*>([!output CONTAINER_ITEM_BASE_CLASS]::GetActiveView()); }
- public:
- [!if !RICH_EDIT_VIEW]
- virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
- virtual void OnActivate();
- [!endif]
- protected:
- [!if !RICH_EDIT_VIEW]
- [!if !ACTIVE_DOC_CONTAINER]
- virtual void OnGetItemPosition(CRect& rPosition);
- [!endif]
- virtual void OnDeactivateUI(BOOL bUndoable);
- virtual BOOL OnChangeItemPosition(const CRect& rectPos);
- [!if CONTAINER_SERVER]
- virtual BOOL CanActivate();
- [!endif]
- [!endif]
- // Implementation
- public:
- ~[!output CONTAINER_ITEM_CLASS]();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- [!if !RICH_EDIT_VIEW]
- virtual void Serialize(CArchive& ar);
- [!endif]
- };