Description

A new image is created from data previously EditCopy/Cut to the clipboard or from bitmap data on the clipboard.

Return Type

A McImage object.  

Syntax

object.EditPasteNew ([Name], [Flags])

The EditPasteNew Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDisplay.
NameOptional. A String value.

BSTR : An optional name to be given to the image. If not given, then the name will be derived from the name of the image on the clipboard.

FlagsOptional. A mcImageCreateFlags enumeration, as described in settings.

long : Image creation flags, as in the McImages.Add method. See mcImageCreateFlags for the list of supported flags.

Settings

The settings for Flags are:

ConstantValueDescription
 mcicfDefault0
 mcicfContiguous1

If set, frames are allocated contiguously, and you cannot add to the FrameCount at a later time.

 mcicfNoInit2

Default is to initialize to 0 (black), this flag suppresses initialization.

 mcicfNoAddToCollection4

If set, the image is created, but not added to the collection (see Notes).

 mcicfNotVisible8

If set, the image is created, possibly added to collection (see above), but not made visible.

 mcipfNoImportProperties8388608

Suppress ImportProperties for functions creating an image from another.

Remarks

The pasted image data 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.

If multiple image clipboard formats are available, their precedence is mcwcftMcImageAoi, mcwcftMcImageDisplayArea, mcwcftCF_DIB, mcwcftCF_BITMAP, and then mcwcftCF_ENHMETAFILE.

Exceptions

“No image on the clipboard” is returned if no image has been placed on the clipboard. Use IsActionAvailable with one of the mcwaMcImageAoiToPasteNew, mcwaMcImageDisplayAreaToPasteNew or mcwaMcImageToPasteNew as the mcWhatAction WhatAction argument to determine if a desired clipboard image format is available.