共用方式為


COleTemplateServer Class

Used for OLE visual editing servers, automation servers, and link containers (applications that support links to embeddings).

class COleTemplateServer : public COleObjectFactory

Members

Public Constructors

Name

Description

COleTemplateServer::COleTemplateServer

Constructs a COleTemplateServer object.

Public Methods

Name

Description

COleTemplateServer::ConnectTemplate

Connects a document template to the underlying COleObjectFactory object.

COleTemplateServer::Unregister

Unregisters the associated document template.

COleTemplateServer::UpdateRegistry

Registers the document type with the OLE system registry.

Remarks

This class is derived from the class COleObjectFactory; usually, you can use COleTemplateServer directly rather than deriving your own class. COleTemplateServer uses a CDocTemplate object to manage the server documents. Use COleTemplateServer when implementing a full server, that is, a server that can be run as a standalone application. Full servers are typically multiple document interface (MDI) applications, although single document interface (SDI) applications are supported. One COleTemplateServer object is needed for each type of server document an application supports; that is, if your server application supports both worksheets and charts, you must have two COleTemplateServer objects.

COleTemplateServer overrides the OnCreateInstance member function defined by COleObjectFactory. This member function is called by the framework to create a C++ object of the proper type.

For more information about servers, see the article Servers: Implementing a Server.

Inheritance Hierarchy

CObject

CCmdTarget

COleObjectFactory

COleTemplateServer

Requirements

Header: afxdisp.h

See Also

Reference

COleObjectFactory Class

Hierarchy Chart

COleServerDoc Class

COleServerItem Class

Concepts

MFC Sample HIERSVR