Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IRichEditOleCallback::QueryAcceptData method

During a paste operation or a drag event, determines if the data that is pasted or dragged should be accepted.

Syntax


HRESULT QueryAcceptData(
   LPDATAOBJECT lpdataobj,
   CLIPFORMAT   *lpcfFormat,
   DWORD        reco,
   BOOL         fReally,
   HGLOBAL      hMetaPict
);

Parameters

lpdataobj

Type: LPDATAOBJECT

The data object being pasted or dragged.

lpcfFormat

Type: CLIPFORMAT*

The clipboard format that will be used for the paste or drop operation. If the value pointed to by lpcfFormat is zero, the best available format will be used. If the callback changes the value pointed to by lpcfFormat, the rich edit control only uses that format and the operation will fail if the format is not available.

reco

Type: DWORD

A clipboard operation flag, which can be one of these values.

ValueMeaning
RECO_DROP

Drop operation (drag-and-drop).

RECO_PASTE

Paste from the clipboard.

 

fReally

Type: BOOL

Indicates whether the drag-drop is actually happening or if it is just a query. A nonzero value indicates the paste or drop is actually happening. A zero value indicates the operation is just a query, such as for EM_CANPASTE.

hMetaPict

Type: HGLOBAL

Handle to a metafile containing the icon view of an object if DVASPECT_ICON is being imposed on an object by a paste special operation.

Return value

Type: HRESULT

Returns S_OK on success. See Remarks.

Remarks

On failure, the rich edit control refuses the data and terminates the operation. Otherwise, the control checks the data itself for acceptable formats. A success code other than S_OK means that the callback either checked the data itself (if fReally is FALSE) or imported the data itself (if fReally is TRUE). If the application returns a success code other than S_OK, the control does not check the read-only state of the edit control.

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

IRichEditOleCallback

 

 

Community Additions

ADD
Show:
© 2015 Microsoft