Colored ASCII in C/C++ URGENT!
Colored ASCII in C/C++ URGENT!
How do you do that?
I mean, how do you write ascii characters with color?
cout, printf?
Is there any function such as LocateText(x,y) or something?
Is there any way to access a linear buffer of characters in the screen? (i mean in a polite way, non assembly, i mean standard ansi c, etc)
Please help!!!
ElPeque
__________________
Alejandro Martínez
all those are compiler dependent. what is your compiler?
in turbo c++:
#include <conio.h>
textcolor(forecolor);
textbackground(backcolor);
gotoxy(xpos,ypos);
My compiler generates one error message: "does not compile."
in turbo c++:
#include <conio.h>
textcolor(forecolor);
textbackground(backcolor);
gotoxy(xpos,ypos);
My compiler generates one error message: "does not compile."
I am currently using Cygwin (the one from cygnus). Not my choice, but i have to use this for the univercity.
I think it is a port of the unix compiler.
Thanks a lot for your help =O)
__________________
Alejandro Martínez
I think it is a port of the unix compiler.
Thanks a lot for your help =O)
__________________
Alejandro Martínez
quote:Original post by alnite
all those are compiler dependent.
They''re also system dependent. The console capabilities of a VT100 terminal far outstrip a Win32 console terminal, though the former can be simulated on the latter.
For Unix-like systems, look into ncurses and color terminals; for Win32, browse MSDN for the console-related functions, particularly those pertaining to console text attributes (...FOREGROUND_RED, ...BACKGROUND_RED, etc).
If you don''t mind writing some funky code, you can use the OEM font (looks like DOS) in a windows form, DrawText and the color functions to so whatever color combinations you need.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement