You can use of textbackground
function for coloring background of text and use of textcolor
function for coloring the text.
before using of these functions, include <stdio.h>
header file!
for coloring every text variously, you must first set textbackground
and textcolor
for each other, then use of cprintf
function.
Attention bellow example:
#include<stdio.h>
#include<conio.h>
void main()
{
//full screen window w: 80, h: 50
window(1,1,80,50);
textbackground(0);//black color
clrscr();
textcolor(15); //white color
gotoxy(1,1); cprintf("WINDOW-1");
//window 2
window(10,10,40,20);
textbackground(1); //blue color
clrscr();
textcolor(15); //white color
gotoxy(1,1); cprintf("WINDOW-2");
//pause screen
getch();
}