COleControl::OnRenderGlobalData
Called by the framework to retrieve data in the specified format when the specified storage medium is global memory.
virtual BOOL OnRenderGlobalData(
LPFORMATETC lpFormatEtc,
HGLOBAL* phGlobal
);
Параметры
lpFormatEtc
Points to the FORMATETC structure specifying the format in which information is requested.phGlobal
Points to a handle to global memory in which the data is to be returned. If no memory has been allocated, this parameter can be NULL.
Возвращаемое значение
Nonzero if successful; otherwise 0.
Заметки
The specified format is one previously placed in the control object using the DelayRenderData member function for delayed rendering. The default implementation of this function simply returns FALSE.
If phGlobal is NULL, then a new HGLOBAL should be allocated and returned in phGlobal. Otherwise, the HGLOBAL specified by phGlobal should be filled with the data. The amount of data placed in the HGLOBAL must not exceed the current size of the memory block. Also, the block cannot be reallocated to a larger size.
Override this function to provide your data in the requested format and medium. Depending on your data, you may want to override one of the other versions of this function instead. If you want to handle multiple storage mediums, override OnRenderData. If your data is in a file, or is of variable size, override OnRenderFileData.
For more information, see the FORMATETC structure in the Windows SDK.
Требования
Header: afxctl.h