int GetCtrlDisplayBitmap (int panelHandle, int controlID, int includeLabel, int *bitmapID);
Creates a bitmap object that contains a screenshot image of the current appearance of a control. You can pass the bitmap ID this function outputs to any function that accepts a bitmap, such as CanvasDrawBitmap or ClipboardPutBitmap.
For example, you can paste a picture of a control onto the system clipboard by calling GetCtrlDisplayBitmap and then passing the bitmap ID to ClipboardPutBitmap.
You can discard the bitmap object by passing the ID to DiscardBitmap.
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 nonzero, the control label is included in the image. |
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. |
Name | Type | Description | ||||
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
|