GUI Integration in Console Applications

I have two independent console applications developed in C ++. I was asked to develop a graphical interface for both of them. In this GUI, I collect some of the parameters needed to run any of these applications. Can anyone give some orientation to integrating console applications with this GUI? Can I run applications from the graphical interface and not see the console? Can events that applications write to the console be redirected to a log file?

Thanks in advance.

+3
source share
5 answers

GUI , GUI-, , .

CreateProcess() API- . STARTUPINFO, , .

, .

Windows API.

++/.NET, System.Diagnostics.Process.

, , , .NET( #), ( API , )

, IMO.

+2

GUI:

1) , . , .

GUI Toolkit, Qt, .


2) , , :

a) , STDOUT , :

./MyProgram > logfile.txt

b) , . ​​

, .

+2

, :

  • , .
  • , ( - ), (execs) , , , .

, , , " ", .

+1

Expect. .

Expect CLI ( inoput, ). ( Perl/Java/Python Tcl), GUI (, Swing to Java).

0

Tcl/Tk. C API C, . . :

  • Tcl . API Tcl argv type char **. , .

  • C/++ .

  • Tcl script.

  • , RPC ( , , ).

Tcl is very portable and will work on many platforms, including Windows. Tcl also comes with a simple GUI toolkit called Tk. Modern versions support theme engines to give them a natural look, so you can make Tk apps pretty close to their native windows.

This post discusses using Tcl / Tk to do the thing you are asking for to some extent.

0
source

Source: https://habr.com/ru/post/1713329/


All Articles