Compartilhar via


CDocObjectServerItem Class

Implements OLE server verbs specifically for DocObject servers.

class CDocObjectServerItem : public COleServerItem

Members

Protected Constructors

Name

Description

CDocObjectServerItem::CDocObjectServerItem

Constructs a CDocObjectServerItem object.

Public Methods

Name

Description

CDocObjectServerItem::GetDocument

Retrieves a pointer to the document that contains the item.

Protected Methods

Name

Description

CDocObjectServerItem::OnHide

Throws an exception if the framework tries to hide a DocObject item.

CDocObjectServerItem::OnShow

Called by the framework to make the DocObject item in-place active. If the item is not a DocObject, calls COleServerItem::OnShow.

Remarks

CDocObjectServerItem defines overridable member functions: OnHide, OnOpen, and OnShow.

To use CDocObjectServerItem, assure that the OnGetEmbeddedItem override in your COleServerDoc-derived class returns a new CDocObjectServerItem object. If you need to change any functionality in your item, you can create a new instance of your own CDocObjectServerItem-derived class.

For further information on DocObjects, see CDocObjectServer and COleCmdUI in the MFC Reference. Also see Internet First Steps: Active Documents and Active Documents.

Inheritance Hierarchy

CObject

CCmdTarget

CDocItem

COleServerItem

CDocObjectServerItem

Requirements

Header: afxdocob.h

See Also

Reference

COleServerItem Class

Hierarchy Chart

CDocObjectServer Class

COleDocObjectItem Class