COleServerDoc Class
The base class for OLE server documents.
class AFX_NOVTABLE COleServerDoc : public COleLinkingDoc
Members
Public Constructors
Name |
Description |
---|---|
Constructs a COleServerDoc object. |
Public Methods
Name |
Description |
---|---|
Activates the associated DocObject document. |
|
Activates the document for in-place editing. |
|
Deactivates the server's user interface. |
|
Discards undo-state information. |
|
Retrieves a pointer to the underlying IOleClientSite interface. |
|
Returns a pointer to an item representing the entire document. |
|
Returns the current clipping rectangle for in-place editing. |
|
Returns the current position rectangle, relative to the container application's client area, for in-place editing. |
|
Returns the zoom factor in pixels. |
|
Determines if the document is a DocObject. |
|
Indicates whether the document is embedded in a container document or running stand-alone. |
|
Returns TRUE if the item is currently activated in place. |
|
Notifies containers that the user has changed the document. |
|
Notifies containers that the user has closed the document. |
|
Notifies containers that the user has renamed the document. |
|
Notifies containers that the user has saved the document. |
|
Called by the framework when the user deactivates an item that was activated in place. |
|
Called by the framework to destroy controls and other user-interface elements created for in-place activation. |
|
Called by the framework when the container's document frame window is activated or deactivated. |
|
Called by the framework when the container application's frame window or document window is resized. |
|
Called by the framework to show or hide control bars for in-place editing. |
|
Called by the framework when a server document that is an embedded item is saved, updating the container's copy of the item. |
|
Changes the position of the in-place editing frame. |
|
Tells the container application to save the document. |
|
Scrolls the container document. |
|
Notifies containers that the user has changed the document. |
Protected Methods
Name |
Description |
---|---|
Called by the framework to create a frame window for in-place editing. |
|
Called by the framework to destroy a frame window for in-place editing. |
|
Override this function to create a new CDocObjectServer object and indicate that this document is a DocObject container. |
|
Called by the framework when a container requests to close the document. |
|
Executes a specified command or displays help for the command. |
|
Called by the framework when the container's frame window is activated or deactivated. |
|
Called to get a COleServerItem that represents the entire document; used to get an embedded item. Implementation required. |
|
Called by the framework to undo changes made during in-place editing. |
|
Called by the framework when a container sets the window title for an embedded object. |
|
Called by the framework to position the in-place editing frame window within the container application's window. |
|
Called by the framework to show or hide the document. |
Remarks
A server document can contain COleServerItem objects, which represent the server interface to embedded or linked items. When a server application is launched by a container to edit an embedded item, the item is loaded as its own server document; the COleServerDoc object contains just one COleServerItem object, consisting of the entire document. When a server application is launched by a container to edit a linked item, an existing document is loaded from disk; a portion of the document's contents is highlighted to indicate the linked item.
COleServerDoc objects can also contain items of the COleClientItem class. This allows you to create container-server applications. The framework provides functions to properly store the COleClientItem items while servicing the COleServerItem objects.
If your server application does not support links, a server document will always contain only one server item, which represents the entire embedded object as a document. If your server application does support links, it must create a server item each time a selection is copied to the Clipboard.
To use COleServerDoc, derive a class from it and implement the OnGetEmbeddedItem member function, which allows your server to support embedded items. Derive a class from COleServerItem to implement the items in your documents, and return objects of that class from OnGetEmbeddedItem.
To support linked items, COleServerDoc provides the OnGetLinkedItem member function. You can use the default implementation or override it if you have your own way of managing document items.
You need one COleServerDoc-derived class for each type of server document your application supports. For example, if your server application supports worksheets and charts, you need two COleServerDoc-derived classes.
For more information on servers, see the article Servers: Implementing a Server.
Inheritance Hierarchy
COleServerDoc
Requirements
Header: afxole.h