This topic is now archived and is closed to further replies.

c:\console help.exe

This topic is 6007 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I was experimenting with the Wincon.h header (included in my project ofcource). And I managed to atleast change the titlebar of the Win32Console.

int main()
     AllocConsole(); //Start console

     Return 0;
Thats the fearthest I came, if I tried to add the code to insert colored text, the compiler, compiled successfully but when the app. ran, windows came up with an "illegal error operation". I could''nt understand it. If anyone can propably help me, PLEASE do so! Thanks! ----------=Last Attacker=---------- ICQ: 120585863 E-mail:

Share this post

Link to post
Share on other sites
Did you remember to get the Console handle before trying to Set the text color?

HANDLE ConsoleHandle;
ConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(ConsoleHandle, FOREGROUND_GREEN);


Share this post

Link to post
Share on other sites