detectgraph,是通过检测硬件确定图形驱动程序和模式。
函数名:detectgraph
功能:通过检测硬件确定图形驱动程序和模式
用法:voidfardetectgraph(intfargraphdriver,intfargraphmode);
程序例:
includegraphics。h
include
include
include
namesofthevariouscardssupported
chardname〔〕{requestsdetection,
aCGA,
anMCGA,
anEGA,
a64KEGA,
amonochromeEGA,
anIBM8514,
aHerculesmonochrome,
anATT6300PC,
aVGA,
anIBM3270PC
};
intmain(void)
{
returnsdetectedhardwareinfo。
intgdriver,gmode,
detectgraphicshardwareavailable
detectgraph(gdriver,gmode);
readresultofdetectgraphcall
errorcodegraphresult();
if(errorcode!grOk)anerror
occurred
{
printf(Graphicserror:sn,
grapherrormsg(errorcode));
printf(Pressanykeytohalt:);
getch();
exit(1);terminatewithanerror
code
}
d...
(全文)