SavePanelDisplayToFile
int SavePanelDisplayToFile (int panelHandle, int scope, Rect area, int newHeight, int newWidth, const char path[]);
Purpose
Creates a bitmap "snapshot" of the specified panel, scales it according to the newHeight and newWidth parameters, and then saves it to file.
Parameters
Input | ||
Name | Type | Description |
panelHandle | int | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function. |
scope | int | Specify a nonzero value or select visible area in the function panel to use the visible area for the bitmap created from the panel display. Specify 0 or select full panel in the function panel to use the full panel for the bitmap created from the panel display. |
area | Rect | Use this parameter to restrict the area of the panel scaled and copied 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 scaled. Use the VAL_ENTIRE_OBJECT macro if you do not want to restrict the area scaled and copied. |
newHeight | int | If you pass VAL_ENTIRE_OBJECT for the area parameter, this parameter specifies the desired height of the resultant bitmap. (If you want to maintain the same height, pass –1.) Otherwise, the resultant height equals (new height/initial height) × area height |
newWidth | int | If you pass VAL_ENTIRE_OBJECT for the area parameter, this parameter specifies the desired width of the resultant bitmap. (If you want to maintain the same width, pass –1.) Otherwise, the resultant width equals (new width/initial width) × area width |
path | const char[] | The pathname of a file. If it is not an absolute pathname, the pathname is relative to the current working directory. |
Return Value
Name | Type | Description | ||
status | int | Returns 0 if the function succeeded or a negative error code if the function failed. The possible negative error codes are:
You can call the GetGeneralErrorString function in the toolbox.fp instrument driver to obtain a description of any of these error codes. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later