02-09-2007 09:25 AM
02-09-2007 10:29 AM
You need to reserve space in your program for the string to be stored in, so use something like:
char model_number [100];
The syntax for the library call to fill in this string with data from the control is like this:
GetCtrlVal (panelHandle, PANEL_STRING, model_number);
Note the & operator is not needed in this case. (The name of any array is treated by C compilers as the address of the first element of the array, without needing the address operator.)
Good luck!
JR
02-09-2007 10:35 AM - edited 02-09-2007 10:35 AM
The usual way is to define an array of characters wide enough to store the whole control string, next pass it to GetCtrlVal function. Please note that you don't need to add the indirect operator ( & ) since any array name is really a pointer to its first element.
char msg[128];
GetCtrlVal (panelHandle, control, msg);
Ouch! That's what happens when you open a page to answer some question and suddenly somebody comes to speak with you!
Message Edited by Roberto Bozzolo on 02-09-2007 05:39 PM