例2-5.c

来自「c语言编程实例,c语言高级编程」· C语言 代码 · 共 29 行

C
29
字号
/* Note:Your choice is C IDE */
#include <stdio.h>
#include <conio.h>
main()
{
	struct text_info current;
	textmode(C80);           
	textbackground(1);       
	textcolor(13); 
	window(1,5,70,20);                      
	cputs("curent information of window\r\n");  
	gettextinfo(&current);
	cprintf("Left corner of window is %d,%d",
	         current.winleft,current.wintop); 
	cprintf("Right corner of window is %d,%d",
	         current.winright,current.winbottom);
    cprintf("Text window attribute is %d",
	         current.attribute);
    cprintf("Text window normal attribute is %d",
	         current.normattr);
	cprintf("Current video mode is %d",current.currmode); 
    cprintf("Window height and width is %d,%d",
	         current.screenheight,current.screenwidth);
    cprintf("Row cursor pos is %d,,Column pos is %d",
	         current.cury,current.curx);    
} 


	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?