C语言中窗口的问题

来源:百度知道 编辑:UC知道 时间:2024/06/05 14:52:36
#include <stdio.h>
int main(void)
{
/* clear the screen */
clrscr();
/* create a text window */
window(10, 10, 80, 25);
/* output some text in the window */
cprintf("Hello world\r\n");
/* wait for a key */
getch();
return 0;
}
这个函数中:window(10, 10, 80, 25); 里面的4个数各代表什么~?
X,Y左边是不是在窗体中的输出起点,宽和高也就是窗体的大小对不对啊·?

表示:左上角的坐标是(10,10),右下角的坐标是(80,25)

函数名: window
功 能: 定义活动文本模式窗口
用 法: void window(int left, int top, int right, int bottom);
程序例:

#include <conio.h>

int main(void)
{

window(10,10,40,11);
textcolor(BLACK);
textbackground(WHITE);
cprintf("This is a test\r\n");

return 0;
}

X坐标,Y坐标,宽,高

坐标