Description

Get an image from the clipboard in a specified format or formats.

Return Type

A McImage object.  

A McImage instance previously placed on the clipboard with EditCopy or EditCut, or it may be a new an McImage instance created from a bitmap or metafile placed on the clipboard by some other application.. If the desired image format is not on the clipboard, then Nothing is returned.

Syntax

object.EditGetClipboardImage ([CF_Type])

The EditGetClipboardImage Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDisplay.
CF_TypeOptional. A mcWhatCF_Types enumeration, as described in settings.

mcWhatCF_Types : If given, the image format to retrieve from the clipboard. The image clipboard formats representing McImage instances placed on the clipboard by EditCopy or EditCut are mcwcftMcImageAoi and mcwcftMcImageDisplayArea. The image clipboard formats representing bitmaps placed on the clipboard are mcwcftCF_DIB, mcwcftCF_BITMAP, mcwcftCF_ENHMETAFILE and mcwcftCF_METAFILEPICT. If the default value of mcwcftNone (0) is given, then any clipboard format will be returned. If more than one requested clipboard format is available, their precedence is mcwcftMcImageAoi, mcwcftMcImageDisplayArea, mcwcftCF_DIB, mcwcftCF_BITMAP, mcwcftCF_ENHMETAFILE and then mcwcftCF_METAFILEPICT.

Settings

The settings for CF_Type are:

ConstantValueDescription
 mcwcftNone0

No clipboard format bits

 mcwcftMcImageAoi1

Private format holding the image area under the AOI of the ImageToDisplay

 mcwcftMcImageDisplayArea2

Private format holding the displayed portion of the ImageToDisplay

 mcwcftCF_ENHMETAFILE16

Enhanced Metafile (EMF) format

 mcwcftCF_DIB32

Device Independent Bitmap (DIB) format

 mcwcftCF_BITMAP64

Device-dependent BITMAP format. This is legal only for the EditGetClipboardImage method. If you want to save a bitmap format to the clipboard, use mcwcftCF_DIB instead.

 mcwcftCF_EMBEDDEDOBJECT128

A format holding the image area under the AOI as an “IQApp Image Document” embedded OLE object.

 mcwcftCF_METAFILEPICT256

Windows Metafile (WMF) format

Remarks

This method returns an McImage instance from the clipboard. The McImage may have been previously placed there by a call to the EditCopy or EditCut methods, or it may be a new image created from a bitmap placed on the clipboard by some other application. You may optionally specify the image clipboard type that you wish to retrieve.

Notes

This method gives you direct access to the clipboard image, so you should release the returned object as soon as you are done with it. If you want a copy of the clipboard image, use EditPasteNew to create one.

For image instances from a the mcwcftMcImageAoi or mcwcftMcImageDisplayArea clipboard format, the McImage.Type will be the same as the source ImageToDisplay.Type, and in these cases EditPasteNew will create an image of that type also. For images created from bitmap or metafile clipboard data, the McImage.Type will be a 24-bit color image with mciBGR McImageType.Interpretation and mcoDIBArray McImageType.Organization. However in these cases, EditPasteNew will create a standard 24-bit RGB image (a mcImageQuickTypes of mciqtRGB).