Communicating, GUI and application



I use a GUI to control a measuring device.
The command system('... .exe') start the console application and
initialize the device.
Now the command window becomes the console.

To really start the measures I want to use a "Start" button in my
GUI. And it doesn't work !
When I start the application directly from the command window, there
is no problem, I can pass arguments to run specific function of the
measuring device simply by using the command '1' and pressing the
'Enter'key (example below).

the C program has the following structure:

....

int main(argc, argv)

....

switch(getchar())

{

case '1':

functionStart();

break;

...

}

....

Is that the right way to do ?

What's the simplest way to communicate between the C program and the
GUI ?

thanks for any suggestion
.


Loading