COleClientItem::CreateStaticFromData
Call this function to create a static item from a COleDataObject object.
BOOL CreateStaticFromData(
COleDataObject* pDataObject,
OLERENDER render = OLERENDER_DRAW,
CLIPFORMAT cfFormat = 0,
LPFORMATETC lpFormatEtc = NULL
);
Parameters
pDataObject
Pointer to the COleDataObject object from which the OLE item is to be created.render
Flag specifying how the server will render the OLE item. For the possible values, see OLERENDER in the Windows SDK.cfFormat
Specifies the Clipboard data format to be cached when creating the OLE item.lpFormatEtc
Pointer to a FORMATETC structure used if render is OLERENDER_FORMAT or OLERENDER_DRAW. Provide a value for this parameter only if you want to specify additional format information beyond the Clipboard format specified by cfFormat. If you omit this parameter, default values are used for the other fields in the FORMATETC structure.
Return Value
Nonzero if successful; otherwise 0.
Remarks
A static item contains the presentation data but not the native data; consequently, it cannot be edited. This is essentially the same as CreateStaticFromClipboard except that a static item can be created from an arbitrary COleDataObject, not just from the Clipboard.
Used in COlePasteSpecialDialog::CreateItem when Static is selected.
For more information, see OleCreateStaticFromData, OLERENDER, and FORMATETC in the Windows SDK.
Requirements
Header: afxole.h
See Also
Reference
COleDataObject::AttachClipboard