[!if RIBBON_TOOLBAR] // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface // (the "Fluent UI") and is provided only as referential material to supplement the // Microsoft Foundation Classes Reference and related electronic documentation // included with the MFC C++ library software. // License terms to copy, use or distribute the Fluent UI are available separately. // To learn more about our Fluent UI licensing program, please visit // https://go.microsoft.com/fwlink/?LinkId=238214. // // Copyright (C) Microsoft Corporation // All rights reserved. [!endif] // $containeritemheader$ : interface of the $containeritemclass$ class // #pragma once class $docclass$; class $viewclass$; class $containeritemclass$ : public $containeritembaseclass$ { DECLARE_SERIAL($containeritemclass$) // Constructors public: [!if RICH_EDIT_VIEW] $containeritemclass$(REOBJECT* preo = nullptr, $docclass$* pContainer = nullptr); [!else] $containeritemclass$($docclass$* pContainer = nullptr); [!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: $docclass$* GetDocument() { return reinterpret_cast<$docclass$*>($containeritembaseclass$::GetDocument()); } $viewclass$* GetActiveView() { return reinterpret_cast<$viewclass$*>($containeritembaseclass$::GetActiveView()); } [!if !RICH_EDIT_VIEW] public: virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam); virtual void OnActivate(); [!endif] [!if !RICH_EDIT_VIEW] protected: [!if !ACTIVE_DOC_CONTAINER] virtual void OnGetItemPosition(CRect& rPosition); [!endif] virtual void OnDeactivateUI(BOOL bUndoable); virtual BOOL OnChangeItemPosition(const CRect& rectPos); virtual BOOL OnShowControlBars(CFrameWnd* pFrameWnd, BOOL bShow); [!if CONTAINER_SERVER] virtual BOOL CanActivate(); [!endif] [!endif] // Implementation public: ~$containeritemclass$(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif [!if !RICH_EDIT_VIEW] virtual void Serialize(CArchive& ar); [!endif] };