|
-
Oct 7th, 2006, 01:09 AM
#1
Thread Starter
Hyperactive Member
Coloring Text, Changing Title in Win32 Console Applications.
I've been searching the web, aswell as a few books, on how to change the title and text color in a Win32 Console Application.
I'm pretty sure it can be done.As I'm sure i've seen an example of it somewhere... Just cant remember where...!
Without balance, there could only be chaos.
Without chaos, there could be no balance.
I live with karma. Eat with destiny. Dream of life without shackles....
Yet. If life had no consequences, life could not exist, nor could it flourish.
If at first you dont succeed.You're screwed.
C++/Java NOOB.
I aint a professional at PHP, but if i can help i will.
-
Oct 7th, 2006, 01:20 AM
#2
Re: Coloring Text, Changing Title in Win32 Console Applications.
For coloring, call GetStdHandle(STD_OUTPUT_HANDLE) to obtain the handle to your console. Then you can call SetConsoleTextAttribute to change foreground color, background color, etc.
Changing the titlebar is trickier. You'll need to find the HWND of the console window and call SetWindowText, unless there's an easier way.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Oct 7th, 2006, 01:34 AM
#3
Thread Starter
Hyperactive Member
Re: Coloring Text, Changing Title in Win32 Console Applications.
Without balance, there could only be chaos.
Without chaos, there could be no balance.
I live with karma. Eat with destiny. Dream of life without shackles....
Yet. If life had no consequences, life could not exist, nor could it flourish.
If at first you dont succeed.You're screwed.
C++/Java NOOB.
I aint a professional at PHP, but if i can help i will.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|