Help Center

OLESetDatafunction

Fired on the source component when a target component performs the GetData method in the source's DataObject component.

Windowsfunctiondoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION OLESetData (BYVAL pData AS Afx_IVBDataObject PTR PTR, BYVAL DataFormat AS SHORT PTR) AS HRESULT

Parameters

NameDescription
pDataAn object in which to place the requested data. The component calls the SetData method to load the requested format.
DataFormatAn integer specifying the format of the data that the target component is requesting. The source component uses this value to determine what to load into the DataObject object.

Description

Fired on the source component when a target component performs the GetData method in the source's DataObject component.

Remarks

In certain cases, you may wish to defer loading data into the DataObject object of a source component to save time, especially if the source component supports many formats. This event allows the source to respond to only one request for a given format of data. When this event is called, the source should check the format parameter to determine what needs to be loaded and then perform the SetData method on the DataObject object to load the data which is then passed back to the target component.

Reference