IMcDisplayCreateDataObject Method
|
|
Returns a new instance of an IDataObject that holds a snapshot of
the current display in the requested CF_ types.
Namespace:
MediaCy.IQL.Display.Viewer
Assembly:
MediaCy.IQL.Display.Viewer (in MediaCy.IQL.Display.Viewer.dll) Version: 10.0.6912.0
SyntaxFunction CreateDataObject (
CF_Types As mcWhatCF_Types
) As Object
Parameters
- CF_Types
- Type: MediaCy.IQL.Display.ViewermcWhatCF_Types
The format(s) in which to render the data.
Currently RegisterClipboardFormat("McDisplay Image Aoi"),
RegisterClipboardFormat("McDisplay Image Display Area"), CF_ENHMETAFILE,
CF_DIB and CF_METAFILEPICT, are supported for the CLIPBOARDFORMAT cfFormat
FORMATETC field (see Notes); they are enumerated in that order for
IDataObject.EnumFormatEtc. These formats correspond to
CF_Types mcwcftMcImageAoi, mcwcftMcImageDisplayArea, mcwcftCF_ENHMETAFILE,
mcwcftCF_DIB, mcwcftCF_METAFILEPICT respectively. The mcWhatCF_Types may be
OR'ed together to create an IDataObject holding multiple types, but this is
generally quite costly, since the rendered data can be very large.
Additionally, mcwcftCF_EMBEDDEDOBJECT may be specified to place an embedded
OLE object holding the bounds of the AOI on the clipboard.
Return Value
Type:
ObjectA new instance of an McDataObject holding a snapshot of the current
display in the requested formats.
RemarksThis IDataObject would be used for clipboard cut/copy operations,
where the clipboard uses delayed rendering to get access to the data.
Note |
---|
Unlike the DataObject property, which always provides the current
display when IDataObject.GetData is called, the IDataObject returned from
the CreateDataObject call is a new, independent object and subsequent changes
to the image or overlays will have no effect on it. Thus, use this method
to "capture" a display state for use at some later time.
When supplying a FORMATETC structure for IDataObject.GetData or
QueryGetData, only the cfFormat field, and optionally the tymed field,
are significant for determining if the requested format is available. If
the tymed field is TYMED_NULL (0) then an available format with any tymed
will match.
The FORMATETC DVTARGETDEVICE* ptd field is significant only when GetData is
called for a CF_ENHMETAFILE cfFormat, where it is used to create the reference
device context for drawing the metafile; otherwise, ptd should be set to NULL.
The dwAspect field should be set to DVASPECT_CONTENT (1) and the lindex field
should be set to -1. |
See Also