Win32 Console in a Win32 App
Hey again everyone.
I've been working on rebuilding my game using some static libraries, and I'm trying to add a console window to the application so that I can easily get data from the application (for various reasons).
I went to New Project (in Visual Studio '05) and created an empty Win32 Console Application, which I added to the main solution. I added a cpp file which I know works in it's own, but the console doesn't open with the main program! What do I need to do to get the console to work with the main application?
You didn't need a new project. You merely needed a call to the Win32 API AllocConsole (and FreeConsole to close it).
If you wish to use C++ stream I/O redirected to that console, you will need to reopen (and/or duplicate) some low level file handles. See here for more information.
If you wish to use C++ stream I/O redirected to that console, you will need to reopen (and/or duplicate) some low level file handles. See here for more information.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement