什么是textheight

核心提示textheight,返回以像素为单位的字符串高度。中文名textheight外文名textheight功 能返回以像素为单位的字符串高度textheight定义函数名: textheighttextheight性质功 能:textheig

最佳答案:

textheight,返回以像素为单位的字符串高度。

详情介绍

textheight,返回以像素为单位的字符串高度。

中文名
textheight
外文名
textheight
功 能
返回以像素为单位的字符串高度

textheight定义

函数名: textheight

textheight性质

功 能:

textheight应用

用 法: int far textheight(char far *textstring);

程序例:

#include<graphics.h>

#include<stdlib.h>

#include<stdio.h>

#include<conio.h>

int main(void)

{

int gdriver = DETECT, gmode, errorcode;

int y = 0;

int i;

char msg;

initgraph(&gdriver, &gmode, "");

errorcode = graphresult();

if (errorcode != grOk)

{

printf("Graphics error: %sn", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1);

}

for (i=1; i<11; i++)

{

settextstyle(TRIPLEX_FONT, HORIZ_DIR, i);

sprintf(msg, "Size: %d", i);

outtextxy(1, y, msg);

y += textheight(msg);

}

getch();

closegraph();

return 0;

}

 
友情链接
鄂ICP备19019357号-22