I have a wxWidgets application and it call a extern commandline-tool. The tool apear in the windows-taskbar and a terminal-box ("dos-box") is opend while it runs.
There is no need for this, because the tool doesn't need input from the user or output to the screen.
Is it possible to call/run a commandline-tool from my wx-application in a hidden state?
hidden commandline-tool Topic is solved
Yes. Just use an unused process :
Code: Select all
wxProcess* proc = new wxProcess(wxPROCESS_REDIRECT); // unused process in order to keep dos window hidden
wxString cmdLine;
...
wxExecute(cmdLine, wxEXEC_SYNC, proc);
delete proc;
Or like this:
Code: Select all
wxArrayString output, errors;
wxString cmdLine;
wxExecute (cmdLine, output, errors, wxEXEC_SYNC);