Launch and read output from a cmd-line app

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
JohnD
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 21, 2008 2:18 pm

Launch and read output from a cmd-line app

Post by JohnD » Mon Feb 20, 2012 12:54 pm

On Windows only (for now), I want to launch an external cmd-line tool from my wx app. As well as passing in command-line args, I need to know when the launched process has finished, and I need to be able to read the output (stderr/stdout) to monitor what's going on.

Does wx provide the tools for this or do I need to dip into Win32? Maybe their is a sample and or certain keywords you can point me towards?

DavidHart
Site Admin
Site Admin
Posts: 4008
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Launch and read output from a cmd-line app

Post by DavidHart » Mon Feb 20, 2012 1:26 pm

Hi,

Have a look at the 'exec' sample (that comes with the wx source).

Regards,

David

Post Reply