/*********************************/
/* struct text_info program */
/* author:xwlee */
/* time: 06/11/3 */
/*********************************/
#include "stdio.h"
#include "conio.h"
int main()
{
struct text_info current;
textmode(C80);
textbackground(1);
textcolor(13);
window(1,5,70,20);
clrscr();
cputs("Current information of window/n/r");
gettextinfo(¤t);
cprintf("Left corner of window is %d,%d/n/r",
current.winleft, current.wintop);
cprintf("Right corner of window is %d,%d/n/r",
current.winright, current.winbottom);
cprintf("Text window attribute is %d/n/r",
current.attribute);
cprintf("Text window normal attribute is %d/n/r",
current.normattr);
cprintf("Current video mode is %d/n/r",current.currmode);
cprintf("Window height and width is %d,%d/n/r",
current.screenheight,current.screenwidth);
cprintf("Row cursor pos is %d,Column pos is %d/n/r",
current.cury,current.curx);
getch();
return 0;
}