IRichEditOle::ImportDataObject method

Imports a clipboard object into a rich edit control, replacing the current selection.

Syntax


HRESULT ImportDataObject(
   LPDATAOBJECT lpdataobj,
   CLIPFORMAT   cf,
   HGLOBAL      hMetaPict
);

Parameters

lpdataobj

Type: LPDATAOBJECT

The clipboard object to import.

cf

Type: CLIPFORMAT

Clipboard format to use. A value of zero will use the best available format.

hMetaPict

Type: HGLOBAL

Handle to a metafile containing the icon view of an object. The handle is used only if the DVASPECT_ICON display aspect is required by a Paste Special operation.

Return value

Type: HRESULT

Returns S_OK on success. If the method fails, it can return one of the following values.

Return codeDescription
E_INVALIDARG

There was an invalid argument.

E_OUTOFMEMORY

There was not enough memory to do the operation.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Richole.h

DLL

Msftedit.dll

See also

IRichEditOle

 

 

Show: