Okay, so my gui program depends on another third-party console program to display info on pdfs. The console program takes the filename of the pdf as an argument and displays the info. I store the displayed info in a textfile. My gui program then reads the text file and displays it in an edit window. For storing the displayed info in a text file , right now I am using the system call:
infodisplayer filename.pdf >> info.txt
Which stores the output into “info.txt” which my gui program then reads. Now this displays an irritating console window because it needs a command processor. I want to not display the console window. So is there some way using the WinApi , Glib , Gtk+ or the C Standard Library that stores the output of a console program in a text file so that I won’t have to resort to a system call? Thanks.
Sorry I know the I didn’t describe my problem well, but what I am doing is this:

Follwing program should do the trick. BTW, this program uses Windows API.
You can put this code block in a Timer event to check the existence of Console Window frequently. or even better you can use this: