CDataObject Class

class CDataObject: public IDataObject

This class is provided as a standard way

Member functions include:  CDataObject,  AddRef,  Release,  QueryInterface,  CacheGlobalData,  DoDragDrop,  SetClipboard,  CacheData,  GetDataHere,  GetData,  GetDataHere,  QueryGetData,  GetCanonicalFormatEtc,  SetData,  EnumFormatEtc,  DAdvise,  DUnadvise, and  EnumDAdvise

Defined in: DataSource.h

Class Members

CDataObject()

Constructor initializes the data object

STDMETHODIMP_(ULONG) AddRef()

AddRef puts a reference count on the object

STDMETHODIMP_(ULONG) Release()

Release Removesa reference count from the object

STDMETHODIMP  QueryInterface(REFIID riid, void** ppv)

Get a new interface

void  CacheGlobalData(CLIPFORMAT cfFormat, HGLOBAL hGlobal, LPFORMATETC lpFormatEtc = NULL)

Cache a global handle in the data object

DWORD  DoDragDrop( DWORD dwEffects = DROPEFFECT_COPY|DROPEFFECT_MOVE|DROPEFFECT_LINK, LPCRECT lpRectStartDrag = NULL, IDropSource* pDropSource = NULL)

Start a new drag drop operation

void  SetClipboard()

Put the data on the clipboard

void  CacheData(CLIPFORMAT cfFormat, LPSTGMEDIUM lpStgMedium, LPFORMATETC lpFormatEtc = NULL)

Cache the data using the STGMEDIUM and FORMATETC structures yourself-- if you have the wherewithall.

STDMETHODIMP  GetData(LPFORMATETC lpFormatEtc, LPSTGMEDIUM lpStgMedium)

IDataObject method for retrieving data

STDMETHODIMP  GetDataHere(LPFORMATETC lpFormatEtc, LPSTGMEDIUM lpStgMedium)

IDataObject method for retrieving data. Client supplies storage medium

STDMETHODIMP  QueryGetData(LPFORMATETC lpFormatEtc)

IDataObject method for determining availability of data format

STDMETHODIMP  EnumFormatEtc(DWORD dwDirection, LPENUMFORMATETC* ppenumFormatEtc)

IDataObject method for retrieving an enumerator for FORMATETCs

STDMETHODIMP  DAdvise(LPFORMATETC, DWORD, LPADVISESINK, LPDWORD pdwConnection)

IDataObject method not supported

STDMETHODIMP  DUnadvise(DWORD)

IDataObject method not supported

STDMETHODIMP  EnumDAdvise(LPENUMSTATDATA* ppenumAdvise)

IDataObject method not supported