Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

COleDataObject Class

Used in data transfers for retrieving data in various formats from the Clipboard, through drag and drop, or from an embedded OLE item.

class COleDataObject

Name

Description

COleDataObject::COleDataObject

Constructs a COleDataObject object.

Name

Description

COleDataObject::Attach

Attaches the specified OLE data object to the COleDataObject.

COleDataObject::AttachClipboard

Attaches the data object that is on the Clipboard.

COleDataObject::BeginEnumFormats

Prepares for one or more subsequent GetNextFormat calls.

COleDataObject::Detach

Detaches the associated IDataObject object.

COleDataObject::GetData

Copies data from the attached OLE data object in a specified format.

COleDataObject::GetFileData

Copies data from the attached OLE data object into a CFile pointer in the specified format.

COleDataObject::GetGlobalData

Copies data from the attached OLE data object into an HGLOBAL in the specified format.

COleDataObject::GetNextFormat

Returns the next data format available.

COleDataObject::IsDataAvailable

Checks whether data is available in a specified format.

COleDataObject::Release

Detaches and releases the associated IDataObject object.

COleDataObject does not have a base class.

These kinds of data transfers include a source and a destination. The data source is implemented as an object of the COleDataSource class. Whenever a destination application has data dropped in it or is asked to perform a paste operation from the Clipboard, an object of the COleDataObject class must be created.

This class enables you to determine whether the data exists in a specified format. You can also enumerate the available data formats or check whether a given format is available and then retrieve the data in the preferred format. Object retrieval can be accomplished in several different ways, including the use of a CFile, an HGLOBAL, or an STGMEDIUM structure.

For more information, see the STGMEDIUM structure in the Windows SDK.

For more information about using data objects in your application, see the article Data Objects and Data Sources (OLE).

Header: afxole.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.