Поделиться через


COleClientItem::CreateLinkFromData

Call this function to create a linked item from a COleDataObject object.

BOOL CreateLinkFromData(
   COleDataObject* pDataObject,
   OLERENDER render = OLERENDER_DRAW,
   CLIPFORMAT cfFormat = 0,
   LPFORMATETC lpFormatEtc = NULL 
);

Параметры

  • 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.

Возвращаемое значение

Nonzero if successful; otherwise 0.

Заметки

Call this during a drop operation when the user indicates a link should be created. It can also be used to handle the Edit Paste command. It is called by the framework in COleClientItem::CreateLinkFromClipboard and in COlePasteSpecialDialog::CreateItem when the Link option has been selected.

For more information, see OleCreateLinkFromData, OLERENDER, and FORMATETC in the Windows SDK.

Требования

Header: afxole.h

См. также

Основные понятия

COleClientItem Class

COleClientItem Members

Hierarchy Chart

COleDataObject::AttachClipboard

COleDataObject Class

COleClientItem::CreateLinkFromClipboard