The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: RedXVII on April 10, 2007, 09:42:56 AM

Title: Create console window
Post by: RedXVII on April 10, 2007, 09:42:56 AM
Anyone know an api to create a console window while i run my program, so that I can print stuff to it. The idea is that it wouldnt normally be available, but I can push a key to make an extra console to print stuff to, much like in games. Using message box's is spammy and inconvenient.

Cheers  :U
Title: Re: Create console window
Post by: RedXVII on April 10, 2007, 09:52:02 AM
Yay!, found it!. Sorry, being kind of dumb today.  :red

invoke AllocConsole
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov MyConsoleWindow, eax
invoke WriteFile, MyConsoleWindow, OFFSET Mytext, SIZEOF MyText, 0, 0
Title: Re: Create console window
Post by: ctt on November 27, 2007, 03:44:10 PM
I knew it was a good thing coming here to find answer quickly to my question!

This was exactly what i was googling around for! Thanks!