Page 1 of 1

Combining console and window application

Posted: Tue Jan 28, 2014 10:23 pm
by bbanelli
Greetings,

if I want to create application that will have both CLI and GUI functions, as far as I have seen, there are two options:

a) compile "console" application, which results with open CLI once user clicks on the icon but outputs on CLI stdout in the same console window that the application was run in
b) compile "window" application where OpenConsole() opens new console window once application is run from the CLI, but has no "blank" console window open once user runs it from as window application

Is there a workaround for this issue to either have output forced in same CLI window where application was run in case 'b' or at least hidden CLI window that happens in case 'a'? Or the only option would be to embed CLI as a standalone application in GUI version and try running it from console by passing parameters to unpacked CLI program?

With my best,

Bruno

Re: Combining console and window application

Posted: Tue Jan 28, 2014 11:37 pm
by luis

Re: Combining console and window application

Posted: Tue Jan 28, 2014 11:44 pm
by bbanelli
Thanks, this was exactly what I was looking for! I'll review it! :) Perhaps this should be added to Windows FAQ?