DuplicateBitmap

int DuplicateBitmap (int sourceBitmapID, int *newBitmap);

Purpose

Creates an exact copy of a bitmap created using one of the following functions:

NewBitmap
NewBitmapEx
GetBitmapFromFile
GetCtrlBitmap
ClipboardGetBitmap
GetCtrlDisplayBitmap
GetPanelDisplayBitmap
GetScaledPanelDisplayBitmap
GetScaledCtrlDisplayBitmap
DuplicateBitmap

Parameters

Input
Name Type Description
bitmapID integer ID of the bitmap object that contains the image. Obtain the ID from NewBitmapEx, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.
Output
Name Type Description
newBitmap integer ID that serves as a handle to the bitmap object.

You can pass the ID to CanvasDrawBitmap, ClipboardPutBitmap, or any other function that accepts a bitmap.

To discard the bitmap, pass the ID to DiscardBitmap.

Return Value

Name Type Description
status integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Code Error Message String
xx Success