Combining console and window application

Windows specific forum
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 544
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Combining console and window application

Post 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
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Combining console and window application

Post by luis »

"Have you tried turning it off and on again ?"
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 544
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: Combining console and window application

Post by bbanelli »

Thanks, this was exactly what I was looking for! I'll review it! :) Perhaps this should be added to Windows FAQ?
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
Post Reply