C语言图形编程函数大全(3)

时间:2026-01-22

图形编程必不可少

gotoxy(endx-startx+1,i);

putch('1');

}

}

main()

{

void border(int,int,int,int);

clrscr();

window(6,8,38,12);

border(6,8,38,12);

gotoxy(2,2);

printf("window 1");

window(8,16,40,24);

border(8,16,40,24);

gotoxy(3,2);

printf("window 2");

getch();

}

4. clreol() 清除光标行尾字符函数

功能: 函数clreol()在当前字符窗口中清除从光标位置到行尾的所有字符,而光标位置保持不变。

用法: 它的调用方式为void clreol(void);

说明: 此函数的相应头文件为 conio.h

返回值:无

例: 程序中使用了函数clreol()和clrscr()

#i nclude "conio.h>

void main()

{

register int i;

gotoxy(6,8);

printf("This is a test of the clreol() function.");

getch();

gotoxy(6,8);

clreol();

for(i=0;i<20;i++)

printf("Hello\n");

getch();

clrscr();

}

5. insline() 插入空行函数

功能: 函数insline()插入一空行到当前光标所在行上,同时光标以下的所有行都向下顺移一行。

用法: 此函数的调用方式为void insline(void);

C语言图形编程函数大全(3).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:4.9 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:19元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219