|
-
Mar 6th, 2002, 12:49 PM
#1
VC++ 6.0 colored text??
how do yo umake colored text and backround for VC++ 6.0? i have tried things but they dont work... any ideas?
-
Mar 6th, 2002, 02:10 PM
#2
I suppose you mean how to choose the colors VC++ chooses for keywords and such.
Tools->Options->Format (on the far right)
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 6th, 2002, 11:52 PM
#3
...
no....
actually, what i wanted to know was how to change the color of the output text that the user will see
-
Mar 7th, 2002, 06:25 AM
#4
Console or GUI app?
Console: SetConsoleTextAttribute
GUI: SetTextColor, SetBkColor
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 7th, 2002, 11:00 AM
#5
concole
umm no its in a console application.. thanks if you can help me
-
Mar 7th, 2002, 12:17 PM
#6
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), flags);
flags can be any combination of the following:
FOREGROUND_BLUE, FOREGROUND_GREEN, FOREGROUND_RED, FOREGROUND_INTENSITY, BACKGROUND_BLUE, BACKGROUND_GREEN, BACKGROUND_RED, and BACKGROUND_INTENSITY
I think they are self-explaining.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 7th, 2002, 12:48 PM
#7
hmm
hmmm, well i kind of see what your saying, but i cant get it to work, are there certain files i need to include or what?
if you want you could show me a sample where this works.
-
Mar 7th, 2002, 01:26 PM
#8
Code:
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY |
BACKGROUND_BLUE | BACKGROUND_INTENSITY);
cout << "hello" << endl;;
return 0;
}
This text will be yellow on blue background.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 8th, 2002, 12:59 PM
#9
error
i tried that, but i get this error....
c:\source\t hall\test progs\colors.cpp(3) : error C2871: 'std' : does not exist or is not a namespace
-
Mar 8th, 2002, 01:05 PM
#10
NEVERMIND
NEVERMIND, I GOT IT TO WORK, THANKS A LOT
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
|