CDocObjectServer Class

Implements the additional OLE interfaces needed to make a normal COleDocument server into a full DocObject server: IOleDocument, IOleDocumentView, IOleCommandTarget, and IPrint.

class CDocObjectServer : public CCmdTarget

Members

Public Constructors

Name

Description

CDocObjectServer::CDocObjectServer

Constructs a CDocObjectServer object.

Public Methods

Name

Description

CDocObjectServer::ActivateDocObject

Activates the document object server, but does not show it.

Protected Methods

Name

Description

CDocObjectServer::OnActivateView

Displays the DocObject view.

CDocObjectServer::OnApplyViewState

Restores the state of the DocObject view.

CDocObjectServer::OnSaveViewState

Saves the state of the DocObject view.

Remarks

CDocObjectServer is derived from CCmdTarget and works closely with COleServerDoc to expose the interfaces.

A DocObject server document can contain CDocObjectServerItem objects, which represent the server interface to DocObject items.

To customize your DocObject server, derive your own class from CDocObjectServer and override its view setup functions, OnActivateView, OnApplyViewState, and OnSaveViewState. You will need to provide a new instance of your class in response to framework calls.

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

Also see the following Knowledge Base article:

  • Q247382 : PRB: ToolTips for Controls in ActiveX Document Server Are Hidden by the ActiveX Document Container

Inheritance Hierarchy

CObject

CCmdTarget

CDocObjectServer

Requirements

Header: afxdocob.h

See Also

Reference

CCmdTarget Class

Hierarchy Chart

CDocObjectServerItem Class