I want to a create dialog box like window before displaying the console window. I haven't actually tried anything yet but was just wondering if it can be displayed as a start-up window.
A:
I'm not sure, but if it's a windowed application already, it might be worth making your own console window to redirect standard IO. It'll certainly look nicer. If you want the exact behavior of the regular console, such as the same copy/paste, you'd have to reimplement it.
Matt Olenik
2010-03-01 13:46:54
No don't have to reimplement anything - there's an API call for creating standard console windows.
Joe Gauterin
2010-03-01 13:48:48
is regular console like cmd.exe?
Dave18
2010-03-01 13:54:34
Yes, same appearance as cmd.exe
Joe Gauterin
2010-03-01 16:05:05
+6
A:
If you compile your win32 application as a console app, the console window will appear before you get a chance to do anything else.
To get around this, you need to use a windows application - this won't display a console window at all by default. Some time after startup you can then call AllocConsole to create a console window.
Joe Gauterin
2010-03-01 13:47:32
Man that is so usefull, I have once, in the past, spent ages looking for this function call
Hassan Syed
2010-03-01 13:51:55