Windows+Console program
Posted: Sun Mar 19, 2006 10:59 am
I'm doing a tool to produce the hash of a file. The program has a GUI, but I'd like the user to be able to use it in console mode too (command line). I compile it with 'Windows mode' option and I check if there is an argument passed (ProgramParameter() ) . In that case, I call OpenConsole(), etc...
The problem is that OpenConsole() opens a new console window even if a console window is already open, while I want to print on the current console window (opened by cmd.exe for example).
Any hints ?? Thank you !
PS: Of course if I compile it with 'Console mode' option , I'd have a console always opened even if the user doesn't pass any argument.
The problem is that OpenConsole() opens a new console window even if a console window is already open, while I want to print on the current console window (opened by cmd.exe for example).
Any hints ?? Thank you !

PS: Of course if I compile it with 'Console mode' option , I'd have a console always opened even if the user doesn't pass any argument.