다음을 통해 공유


CDocObjectServer::CDocObjectServer

Constructs and initializes a CDocObjectServer object.

explicit CDocObjectServer( 
   COleServerDoc* pOwner, 
   LPOLEDOCUMENTSITE pDocSite = NULL  
);

Parameters

  • pOwner
    A pointer to the client site document that is the client for the DocObject server.

  • pDocSite
    A pointer to the IOleDocumentSite interface implemented by the container.

Remarks

When a DocObject is active, the client site OLE interface (IOleDocumentSite) is what allows the DocObject server to communicate with its client (the container). When a DocObject server is activated, it first checks that the container implements the IOleDocumentSite interface. If so, COleServerDoc::GetDocObjectServer is called to see if the container supports DocObjects. By default, GetDocObjectServer returns NULL. You must override COleServerDoc::GetDocObjectServer to construct a new CDocObjectServer object or a derived object of your own, with pointers to the COleServerDoc container and its IOleDocumentSite interface as arguments to the constructor.

Requirements

Header: afxdocob.h

See Also

Reference

CDocObjectServer Class

Hierarchy Chart

CDocObjectServerItem Class

COleServerDoc::GetDocObjectServer

Other Resources

CDocObjectServer Members