codecamp

TextOut,outtextxy

 原型:extern void TextOut(int x, int y, char *str, int mode);
             
 用法:#include <system.h>
 
 功能:在屏幕上指定位置输出字符串
 
 说明:outtextxy为指向TextOut的宏,用法相同。
       str所指向字符串可以为中文或英文。中文显示成16x16点阵,英文显示成8x16点阵。
       mode决定往屏幕上写的方式,其值含义如下:
       0:背景透明,点阵中为0的点不显示。
       1:正常方式,即点阵中为0的点擦除,为1的点显示。
       2:反显方式,即点阵中为1的点擦除,为0的点显示。
       3:异或方式,即点阵中点的值和屏幕当前位置的值作异或后取值,为0则擦除,为1显示。
 
 
 举例:

     // TextOut.c
     
     #include <system.h>
     main()
     {
       clrscr();
       
       TextOut(0,0,"文曲星",1);
       TextOut(10,10,"文曲星",0);
       
       TextOut(20,20,"您好",2);
       TextOut(30,30,"GGV-金远见",3);
       getchar();
       return 0;
     }


TextOut
bell
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

alloi动态内存

stdio输入输出函数

stdlib基础库函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }