Поделиться через


COleServerDoc::GetDocObjectServer

Override this function to create a new CDocObjectServer item and return a pointer to it.

virtual CDocObjectServer* GetDocObjectServer( 
   LPOLEDOCUMENTSITE pDocSite  
);

Параметры

  • pDocSite
    Pointer to the IOleDocumentSite interface that will connect this document to the server.

Возвращаемое значение

A pointer to a CDocObjectServer; NULL if the operation failed.

Заметки

When a DocObject server is activated, the return of a non-NULL pointer shows that the client can support DocObjects. The default implementation returns NULL.

A typical implementation for a document that supports DocObjects will simply allocate a new CDocObjectServer object and return it to the caller. For example:

CDocObjectServer* CMFCOleServerDoc::GetDocObjectServer(LPOLEDOCUMENTSITE pSite)
{
   return new CDocObjectServer(this, pSite);
}

Требования

Header: afxole.h

См. также

Основные понятия

COleServerDoc Class

COleServerDoc Members

Hierarchy Chart

CDocObjectServer::CDocObjectServer