当前位置:首页 科普知识 detectgraph

detectgraph

发布时间:2023-09-14 01:33:53

detectgraph,计算机函数。实现检测硬件确定图形驱动程序和模式。

detectgraph介绍

detectgraph,计算机函数。实现检测硬件确定图形驱动程序和模式。

detectgraph

函数名: detectgraph

用 法: void far detectgraph(int far *graphdriver, int far *graphmode);

程序例:

#include <graphics.h>

#include

#include

#include

char *dname = { "requests detection",

"a CGA",

"an MCGA",

"an EGA",

"a 64K EGA",

"a monochrome EGA",

"an IBM 8514",

"a Hercules monochrome",

"an AT&T 6300 PC",

"a VGA",

detectgraph

"an IBM 3270 PC"

};

int main(void)

{

int gdriver, gmode, errorcode;

detectgraph(&gdriver, &gmode);

errorcode = graphresult();

if (errorcode != grOk)

{

printf("Graphics error: %sn",

grapherrormsg(errorcode));

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

getch();

exit(1);

}

clrscr();

printf("You have %s video display

card.n", dname);

detectgraph

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

getch();

return 0;

}

温馨提示:
本文【detectgraph】由作者 爱百科 转载提供。 该文观点仅代表作者本人, 自学教育网 信息发布平台,仅提供信息存储空间服务, 若存在侵权问题,请及时联系管理员或作者进行删除。
(c)2008-2025 自学教育网 All Rights Reserved 汕头市灵创科技有限公司
粤ICP备2024240640号-6