Copy

The Copy performs a transfer of the data corresponding to a rectangle of pixels from the active image into a inactive image.

Copy nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc, sRop

Parameters

nXDest
Specifies the logical x-coordinate of the upper-left corner of the destination rectangle.

nYDest
Specifies the logical y-coordinate of the upper-left corner of the destination rectangle.

nWidth
Specifies the logical width of the source and destination rectangles.

nHeight
Specifies the logical height of the source and destination rectangles.

nXSrc
Specifies the logical x-coordinate of the upper-left corner of the source rectangle.

nYSrc
Specifies the logical y-coordinate of the upper-left corner of the source rectangle.

sRop
Specifies a raster-operation code. These codes define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color.
StringMeaning
"DSTINVERT" Inverts the destination rectangle.
"MERGECOPY" Merges the colors of the source rectangle with the specified pattern by using the Boolean AND operator.
"MERGEPAINT" Merges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.
"NOTSRCCOPY" Copies the inverted source rectangle to the destination.
"NOTSRCERASE" Combines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.
"SRCAND" Combines the colors of the source and destination rectangles by using the Boolean AND operator.
"SRCCOPY" Copies the source rectangle directly to the destination rectangle.
"SRCERASE" Combines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.
"SRCINVERT" Combines the colors of the source and destination rectangles by using the Boolean XOR operator.
"SRCPAINT" Combines the colors of the source and destination rectangles by using the Boolean OR operator.

Return values

True if successful, otherwise False.

Remarks

The "active image" means the image currently selected by SelectClipboard calling.

If some transformations exist in the destination image, the rectangle in the destination image is stretched, compressed, or rotated as necessary.

Example
See InitClipboard.