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: |
| object | An expression evaluating to an object of type McDisplay. | | CF_Type | Optional. 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:
 | mcwcftNone | 0 |
No clipboard format bits
|
 | mcwcftMcImageAoi | 1 |
Private format holding the image area under the AOI of the ImageToDisplay
|
 | mcwcftMcImageDisplayArea | 2 |
Private format holding the displayed portion of the ImageToDisplay
|
 | mcwcftCF_ENHMETAFILE | 16 |
Enhanced Metafile (EMF) format
|
 | mcwcftCF_DIB | 32 |
Device Independent Bitmap (DIB) format
|
 | mcwcftCF_BITMAP | 64 |
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_EMBEDDEDOBJECT | 128 |
A format holding the image area under the AOI as an IQApp Image Document embedded OLE object.
|
 | mcwcftCF_METAFILEPICT | 256 |
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).
|