GetTableCellRingValueFromIndexLimited
int GetTableCellRingValueFromIndexLimited (int panelHandle, int controlID, Point cell, int index, int maximumNumberOfBytes, int *numberOfBytesCopied, unsigned char stringValue[]);
Purpose
This function returns as much of the string value of a specified item in a list as fits within maximumNumberOfBytes. You can get string values from ring or combo box cells of table controls using this function.
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. |
cell | Point | A Point structure specifying the cell from which the function obtains the value. The Point structure is defined as follows: typedef struct { int x; int y; } Point; Pass the one-based column index of the cell in the x field of the structure, and the one-based row index of the cell in the y field of the structure. You can create a Point without having to declare a variable by using the following function: Point MakePoint (int x, int y); Example GetTableCellRingValueFromIndexLimited (panelHandle, controlID, MakePoint (2, 3), index, maxNumBytes, &numBytesCopied, strVal); |
index | int | The zero-based index into the list of values. |
maximumNumberOfBytes | int | The maximum number of bytes to obtain from the string value, including the ASCII NUL byte. |
Output | ||
Name | Type | Description |
numberOfBytesCopied | int | Returns the number of bytes successfully obtained, including the ASCII NUL byte. |
stringValue | unsigned char [] | Returns the string value that fits within maximumNumberOfBytes. |
Return Value
Name | Type | Description |
status | int | Returns 0 if the function succeeded or a negative error code if the function failed. You can obtain a description of any of these error codes using the GetGeneralErrorString function in the toolbox.fp instrument driver. |
Additional Information
Library: Programmer's Toolbox
Include file: toolbox\toolbox.h
LabWindows/CVI compatibility: LabWindows/CVI 2012 and later