COleDataObject

COleDataObject does not have a base class.

The COleDataObject class is used in data transfers for retrieving data in various formats from the Clipboard, through drag and drop, or from an embedded OLE item. 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 OLE 2 Programmer’s Reference, Volume 1.

For more information about using data objects in your application, see the article Data Objects and Data Sources (OLE) in Visual C++ Programmer’s Guide.

#include <afxole.h>

Class MembersHierarchy Chart

Samples   MFC Sample HIERSVRMFC Sample OCLIENT

See Also   COleDataSource, COleClientItem, COleServerItem, COleDataSource::DoDragDrop, CView::OnDrop