I get the feeling that we are not understanding one another. As I said, everything works as I expect on Linux and Mac OS X (I have just checked), so let me explain a bit more what is 'wrong' with Windows.
Ok, say that you open a command prompt window. From there, if I enter the name of my application without any argument, then I want the GUI to show up (easy, since it's already the way it works):
Now, say that I add some arguments. This time round, I want my application to behave as a pure console application, so that I can do whatever I want with it (e.g. redirect the output to a file):C:\MyApplicationDirectory>MyApplication
C:\MyApplicationDirectory>
Now, as I have said in a previous reply, I can use AttachConsole() and WriteConsole() to 'mimick' the above output, but 1) it's a hack and 2) I can't get the right kind of output (and I am not sure whether I could redirect to a file; I haven't tried) since when starting a GUI application from the command line, Windows goes back to the prompt straightaway, so if anything using AttachConsole() and WriteConsole() I could get:C:\MyApplicationDirectory>MyApplication /i myInputFile
MyApplication is going to proceed using myInputFile as an input file
...
C:\MyApplicationDirectory>
which is clearly not professional...C:\MyApplicationDirectory>MyApplication /i myInputFile
C:\MyApplicationDirectory>
MyApplication is going to proceed using myInputFile as an input file
...
Bookmarks