News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Create console window

Started by RedXVII, April 10, 2007, 09:42:56 AM

Previous topic - Next topic

RedXVII

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

RedXVII

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

ctt

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!