# GetScaledCtrlDisplayBitmap

int GetScaledCtrlDisplayBitmap (int panelHandle, int controlID, int includeLabel, int newHeight, int newWidth, int *bitmapID);

## Purpose

Creates a bitmap object that contains a screenshot image of the current appearance of a control. newHeight and newWidth determine the dimensions of the bitmap. The image stretches or shrinks to fit the specified dimensions.

You can use GetScaledCtrlDisplayBitmap to retrieve a scaled bitmap that you can pass to ClipboardPutBitmap. From the clipboard, you can paste the picture of the control into another application in the size you want for that application.

To discard the bitmap object, pass its 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.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
includeLabel | integer | Specifies whether to include the control label in the image. If you pass a nonzero value, the control label appears in the image.
newHeight | integer | The height, in pixels, of the bitmap image. Values: 1 to 32,767, or pass –1 to use the height of the control on the screen.
newWidth | integer | The width, in pixels, of the bitmap image. Values: 1 to 32,767, or pass –1 to use the width of the control on the screen.
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