COleServerItem Class
Provides the server interface to OLE items.
class COleServerItem : public CDocItem
Members
Protected Constructors
Name |
Description |
---|---|
Constructs a COleServerItem object. |
Public Methods
Name |
Description |
---|---|
Places presentation and conversion formats in a COleDataSource object. |
|
Copies the item to the Clipboard. |
|
Performs a drag-and-drop operation. |
|
Gets the data source for use in data transfer (drag and drop or Clipboard). |
|
Returns the server document that contains the item. |
|
Gets the CF_EMBEDSOURCE data for an OLE item. |
|
Returns the name of the item. Used for linked items only. |
|
Gets the CF_LINKSOURCE data for an OLE item. |
|
Gets the CF_OBJECTDESCRIPTOR data for an OLE item. |
|
Indicates whether the item is currently attached to an active container. |
|
Indicates whether the item represents a linked OLE item. |
|
Updates all containers with automatic link update. |
|
Called to execute a verb. |
|
Called when the container requests to draw the item; implementation required. |
|
Called for specialized item drawing. |
|
Called by the framework to get the data that would be copied to the Clipboard. |
|
Called by the framework to retrieve the size of the OLE item. |
|
Called by the framework to initialize an OLE item using the contents of the data transfer object specified. |
|
Called to determine whether any linked items require updating. |
|
Retrieves data as part of delayed rendering. |
|
Retrieves data into a CFile object as part of delayed rendering. |
|
Retrieves data into an HGLOBAL as part of delayed rendering. |
|
Called to set the item's color scheme. |
|
Called to set the item's data. |
|
Called by the framework to set the size of the OLE item. |
|
Called when some portion of the document the item belongs in is changed. |
|
Called to update the presentation cache of all items in the server document. |
|
Sets the name of the item. Used for linked items only. |
Protected Methods
Name |
Description |
---|---|
Gets the object used to store conversion formats. |
|
Called by the framework to hide the OLE item. |
|
Called by the framework to display the OLE item in its own top-level window. |
|
Called when the container requests to show the item. |
Public Data Members
Name |
Description |
---|---|
Informs the server about how much of the OLE item is visible. |
Remarks
A linked item can represent some or all of a server document. An embedded item always represents an entire server document.
The COleServerItem class defines several overridable member functions that are called by the OLE system dynamic-link libraries (DLLs), usually in response to requests from the container application. These member functions allow the container application to manipulate the item indirectly in various ways, such as by displaying it, executing its verbs, or retrieving its data in various formats.
To use COleServerItem, derive a class from it and implement the OnDraw and Serialize member functions. The OnDraw function provides the metafile representation of an item, allowing it to be displayed when a container application opens a compound document. The Serialize function of CObject provides the native representation of an item, allowing an embedded item to be transferred between the server and container applications. OnGetExtent provides the natural size of the item to the container, enabling the container to size the item.
For more information about servers and related topics, see the article Servers: Implementing a Server and "Creating a Container/Server Application" in the article Containers: Advanced Features.
Inheritance Hierarchy
COleServerItem
Requirements
Header: afxole.h