int SaveCtrlDisplayToFile (int panelHandle, int controlID, int includeLabel, int newHeight, int newWidth, const char path[]);
Creates a bitmap "snapshot" of the specified control, scales it according to the newHeight and newWidth parameters, and then saves it to file.
Input | ||
Name | Type | Description |
panelHandle | integer | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function. |
controlID | integer | The defined constant (located in the UIR header file) that was assigned to the control in the User Interface Editor or the ID returned by the NewCtrl or |
includeLabel | integer | Specifies whether to include the control label (if any) in the bitmap created from the current appearance of the control. |
newHeight | integer | Specifies the desired height of the resultant bitmap. Use |
newWidth | integer | Specifies the desired width of the resultant bitmap. Use |
path | const char [] | The pathname of a file. If it is not an absolute pathname, the pathname is relative to the current working directory. |
Name | Type | Description | ||
status | integer | 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. |