tc界面图形程序1

来源:百度知道 编辑:UC知道 时间:2024/05/25 16:26:48
可以写一个改变tc运行界面背景色的程序吗?

简单!
#include <stdio.h>
#include <conio.h>
int main(void)
{
int color;
for (color = 0; color < 8; color++)
{
textbackground(color);
cprintf("This is color %d\r\n", color);
cprintf("Press any key to continue\r\n");
getch();
}
return 0;
}

c库函数有:conio.h
void textbackground(int newcolor) 背景颜色
void textcolor(int newcolor) 文字颜色