From 11:00 PM CST Friday, Apr 11th - 1:30 PM CST Saturday, Apr 12th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

GetScaledCtrlDisplayBitmap

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.

Supported Controls

You can use GetScaledCtrlDisplayBitmap with all LabWindows/CVI user interface controls.

Parameters

Input
Name Type Description
panelHandle int Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel.
controlID int 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 functions such as NewCtrl and DuplicateCtrl.
includeLabel int Specifies whether to include the control label (if any) in the image.

Specify a nonzero value or select Yes in the function panel to include the control label.

Specify 0 or select No in the function panel to omit the control label.
newHeight int 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 int 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 int ID that serves as a handle to the bitmap object.

You can pass the ID to functions that accept a bitmap, such as CanvasDrawBitmap and ClipboardPutBitmap.

To discard the bitmap, pass the ID to DiscardBitmap.

Zero is not a valid bitmap ID.

Return Value

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

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Was this information helpful?

Help us improve your future ni.com experience.

What are you trying to do?

Submit