Share via


COleServerItem Class

Provides the server interface to OLE items.

class COleServerItem : public CDocItem

Members

Protected Constructors

Name

Description

COleServerItem::COleServerItem

Constructs a COleServerItem object.

Public Methods

Name

Description

COleServerItem::AddOtherClipboardData

Places presentation and conversion formats in a COleDataSource object.

COleServerItem::CopyToClipboard

Copies the item to the Clipboard.

COleServerItem::DoDragDrop

Performs a drag-and-drop operation.

COleServerItem::GetClipboardData

Gets the data source for use in data transfer (drag and drop or Clipboard).

COleServerItem::GetDocument

Returns the server document that contains the item.

COleServerItem::GetEmbedSourceData

Gets the CF_EMBEDSOURCE data for an OLE item.

COleServerItem::GetItemName

Returns the name of the item. Used for linked items only.

COleServerItem::GetLinkSourceData

Gets the CF_LINKSOURCE data for an OLE item.

COleServerItem::GetObjectDescriptorData

Gets the CF_OBJECTDESCRIPTOR data for an OLE item.

COleServerItem::IsConnected

Indicates whether the item is currently attached to an active container.

COleServerItem::IsLinkedItem

Indicates whether the item represents a linked OLE item.

COleServerItem::NotifyChanged

Updates all containers with automatic link update.

COleServerItem::OnDoVerb

Called to execute a verb.

COleServerItem::OnDraw

Called when the container requests to draw the item; implementation required.

COleServerItem::OnDrawEx

Called for specialized item drawing.

COleServerItem::OnGetClipboardData

Called by the framework to get the data that would be copied to the Clipboard.

COleServerItem::OnGetExtent

Called by the framework to retrieve the size of the OLE item.

COleServerItem::OnInitFromData

Called by the framework to initialize an OLE item using the contents of the data transfer object specified.

COleServerItem::OnQueryUpdateItems

Called to determine whether any linked items require updating.

COleServerItem::OnRenderData

Retrieves data as part of delayed rendering.

COleServerItem::OnRenderFileData

Retrieves data into a CFile object as part of delayed rendering.

COleServerItem::OnRenderGlobalData

Retrieves data into an HGLOBAL as part of delayed rendering.

COleServerItem::OnSetColorScheme

Called to set the item's color scheme.

COleServerItem::OnSetData

Called to set the item's data.

COleServerItem::OnSetExtent

Called by the framework to set the size of the OLE item.

COleServerItem::OnUpdate

Called when some portion of the document the item belongs in is changed.

COleServerItem::OnUpdateItems

Called to update the presentation cache of all items in the server document.

COleServerItem::SetItemName

Sets the name of the item. Used for linked items only.

Protected Methods

Name

Description

COleServerItem::GetDataSource

Gets the object used to store conversion formats.

COleServerItem::OnHide

Called by the framework to hide the OLE item.

COleServerItem::OnOpen

Called by the framework to display the OLE item in its own top-level window.

COleServerItem::OnShow

Called when the container requests to show the item.

Public Data Members

Name

Description

COleServerItem::m_sizeExtent

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

CObject

CCmdTarget

CDocItem

COleServerItem

Requirements

Header: afxole.h

See Also

Reference

CDocItem Class

Hierarchy Chart

COleClientItem Class

COleServerDoc Class

COleTemplateServer Class

Concepts

MFC Sample HIERSVR