GetPanelDisplayBitmap

int GetPanelDisplayBitmap (int panelHandle, int scope, Rect area, int *bitmapID);

Purpose

Creates a bitmap object that contains a screenshot image of the current appearance of a panel. You can pass the bitmap ID to any function that accepts a bitmap, such as CanvasDrawBitmap or ClipboardPutBitmap.

For example, you can paste a picture of a panel onto the system clipboard by calling GetPanelDisplayBitmap and then passing the bitmap ID to ClipboardPutBitmap.

You can discard the bitmap object by passing the ID to DiscardBitmap.

Parameters

Input
Name Type Description
panelHandle integer Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
scope integer Specifies which portions of the panel to copy to the bitmap.

Select one of the following values:

VAL_VISIBLE_AREA—Copies the visible area of the panel to the bitmap, including the frame, menu bar, and scroll bars.
VAL_FULL_PANEL—Copies the entire contents of the panel to the bitmap, excluding the frame, menu bar, and scroll bars. This includes contents that might currently be scrolled off the visible area.

Regardless of the scope, objects within child panels are clipped to the frame of the child panel.
area Rect Restricts the area of the panel to copy into the bitmap.

You must pass a Rect structure. The rectangle coordinates, specified in pixels, are relative to the upper-left corner of the panel, directly below the title bar, before the panel is scrolled.

Use VAL_ENTIRE_OBJECT if you do not want to restrict the area to copy.
Output
Name Type Description
bitmapID 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