




已阅读5页,还剩47页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
拘赙将砰横咦笥却函数名GCVT功能把浮点数转换成字符串用法CHARGCVTDOUBLEVALUE,INTNDIGIT,CHARBUF程序例INCLUDEINCLUDEINTMAINVOIDCHARSTR25DOUBLENUMINTSIG5/SIGNIFICANTDIGITS/AREGULARNUMBER/NUM9876GCVTNUM,SIG,STRPRINTF“STRINGSN“,STR/ANEGATIVENUMBER/NUM1234567GCVTNUM,SIG,STRPRINTF“STRINGSN“,STR/SCIENTIFICNOTATION/NUM0678E5GCVTNUM,SIG,STRPRINTF“STRINGSN“,STRRETURN0函数名GENINTERRUPT功能产生一个软中断用法VOIDGENINTERRUPTINTINTR_NUM程序例INCLUDEINCLUDE/FUNCTIONPROTOTYPE/VOIDWRITECHARCHARCHINTMAINVOIDCLRSCRGOTOXY80,25WRITECHARGETCHRETURN0/OUTPUTSACHARACTERATTHECURRENTCURSORPOSITIONUSINGTHEVIDEOBIOSTOAVOIDTHESCROLLINGOFTHESCREENWHENWRITINGTOLOCATION80,25/VOIDWRITECHARCHARCHSTRUCTTEXT_INFOTI/GRABCURRENTTEXTSETTINGS/GETTEXTINFO/INTERRUPT0X10SUBFUNCTION9/_AH9/CHARACTERTOBEOUTPUT/_ALCH_BH0/VIDEOPAGE/_BLTIATTRIBUTE/VIDEOATTRIBUTE/_CX1/REPETITIONFACTOR/GENINTERRUPT0X10/OUTPUTTHECHAR/函数名GETARCCOORDS功能取得最后一次调用ARC的坐标用法VOIDFARGETARCCOORDSSTRUCTARCCOORDSTYPEFARARCCOORDS程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODESTRUCTARCCOORDSTYPEARCINFOINTMIDX,MIDYINTSTANGLE45,ENDANGLE270CHARSSTR80,ESTR80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1MIDXGETMAXX/2MIDYGETMAXY/2/DRAWARCANDGETCOORDINATES/SETCOLORGETMAXCOLORARCMIDX,MIDY,STANGLE,ENDANGLE,100GETARCCOORDS/CONVERTARCINFORMATIONINTOSTRINGS/SPRINTFSSTR,“D,D“,ARCINFOXSTART,ARCINFOYSTARTSPRINTFESTR,“D,D“,ARCINFOXEND,ARCINFOYEND/OUTPUTTHEARCINFORMATION/OUTTEXTXYARCINFOXSTART,ARCINFOYSTART,SSTROUTTEXTXYARCINFOXEND,ARCINFOYEND,ESTR/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETASPECTRATIO功能返回当前图形模式的纵横比用法VOIDFARGETASPECTRATIOINTFARXASP,INTFARYASP程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTXASP,YASP,MIDX,MIDY/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1MIDXGETMAXX/2MIDYGETMAXY/2SETCOLORGETMAXCOLOR/GETCURRENTASPECTRATIOSETTINGS/GETASPECTRATIO/DRAWNORMALCIRCLE/CIRCLEMIDX,MIDY,100GETCH/DRAWWIDECIRCLE/CLEARDEVICESETASPECTRATIOXASP/2,YASPCIRCLEMIDX,MIDY,100GETCH/DRAWNARROWCIRCLE/CLEARDEVICESETASPECTRATIOXASP,YASP/2CIRCLEMIDX,MIDY,100/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETBKCOLOR功能返回当前背景颜色用法INTFARGETBKCOLORVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTBKCOLOR,MIDX,MIDYCHARBKNAME35/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1MIDXGETMAXX/2MIDYGETMAXY/2SETCOLORGETMAXCOLOR/FORCENTERINGTEXTONTHEDISPLAY/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXT/GETTHECURRENTBACKGROUNDCOLOR/BKCOLORGETBKCOLOR/CONVERTCOLORVALUEINTOASTRING/ITOABKCOLOR,BKNAME,10STRCATBKNAME,“ISTHECURRENTBACKGROUNDCOLOR“/DISPLAYAMESSAGE/OUTTEXTXYMIDX,MIDY,BKNAME/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETC功能从流中取字符用法INTGETCFILESTREAM程序例INCLUDEINTMAINVOIDCHARCHPRINTF“INPUTACHARACTER“/READACHARACTERFROMTHESTANDARDINPUTSTREAM/CHGETCSTDINPRINTF“THECHARACTERINPUTWASCN“,CHRETURN0函数名GETCBRK功能获取CONTROL_BREAK设置用法INTGETCBRKVOID程序例INCLUDEINCLUDEINTMAINVOIDIFGETCBRKPRINTF“CNTRLBRKFLAGISONN“ELSEPRINTF“CNTRLBRKFLAGISOFFN“RETURN0函数名GETCH功能从控制台无回显地取一个字符用法INTGETCHVOID程序例INCLUDEINCLUDEINTMAINVOIDCHARCHPRINTF“INPUTACHARACTER“CHGETCHEPRINTF“NYOUINPUTACN“,CHRETURN0函数名GETCHAR功能从STDIN流中读字符用法INTGETCHARVOID程序例INCLUDEINTMAINVOIDINTC/NOTETHATGETCHARREADSFROMSTDINANDISLINEBUFFEREDTHISMEANSITWILLNOTRETURNUNTILYOUPRESSENTER/WHILECGETCHARNPRINTF“C“,CRETURN0函数名GETCHE功能从控制台取字符带回显用法INTGETCHEVOID程序例INCLUDEINCLUDEINTMAINVOIDCHARCHPRINTF“INPUTACHARACTER“CHGETCHEPRINTF“NYOUINPUTACN“,CHRETURN0函数名GETCOLOR功能返回当前画线颜色用法INTFARGETCOLORVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTCOLOR,MIDX,MIDYCHARCOLNAME35/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1MIDXGETMAXX/2MIDYGETMAXY/2SETCOLORGETMAXCOLOR/FORCENTERINGTEXTONTHEDISPLAY/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXT/GETTHECURRENTDRAWINGCOLOR/COLORGETCOLOR/CONVERTCOLORVALUEINTOASTRING/ITOACOLOR,COLNAME,10STRCATCOLNAME,“ISTHECURRENTDRAWINGCOLOR“/DISPLAYAMESSAGE/OUTTEXTXYMIDX,MIDY,COLNAME/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETCURDIR功能取指定驱动器的当前目录用法INTGETCURDIRINTDRIVE,CHARDIREC程序例INCLUDEINCLUDEINCLUDECHARCURRENT_DIRECTORYCHARPATHSTRCPYPATH,“X“/FILLSTRINGWITHFORMOFRESPONSEX/PATH0AGETDISK/REPLACEXWITHCURRENTDRIVELETTER/GETCURDIR0,PATH3/FILLRESTOFSTRINGWITHCURRENTDIRECTORY/RETURNPATHINTMAINVOIDCHARCURDIRMAXPATHCURRENT_DIRECTORYCURDIRPRINTF“THECURRENTDIRECTORYISSN“,CURDIRRETURN0函数名GETCWD功能取当前工作目录用法CHARGETCWDCHARBUF,INTN程序例INCLUDEINCLUDEINTMAINVOIDCHARBUFFERMAXPATHGETCWDBUFFER,MAXPATHPRINTF“THECURRENTDIRECTORYISSN“,BUFFERRETURN0函数名GETDATE功能取DOS日期用法VOIDGETDATESTRUCTDATEBLK程序例INCLUDEINCLUDEINTMAINVOIDSTRUCTDATEDGETDATEPRINTF“THECURRENTYEARISDN“,DDA_YEARPRINTF“THECURRENTDAYISDN“,DDA_DAYPRINTF“THECURRENTMONTHISDN“,DDA_MONRETURN0函数名GETDEFAULTPALETTE功能返回调色板定义结构用法STRUCTPALETTETYPEFARGETDEFAULTPALETTEVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTI/STRUCTUREFORRETURNINGPALETTECOPY/STRUCTPALETTETYPEFARPALVOID0/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1SETCOLORGETMAXCOLOR/RETURNAPOINTERTOTHEDEFAULTPALETTE/PALGETDEFAULTPALETTEFORI0ICOLORSIGETCH/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETDISK功能取当前磁盘驱动器号用法INTGETDISKVOID程序例INCLUDEINCLUDEINTMAINVOIDINTDISKDISKGETDISKAPRINTF“THECURRENTDRIVEISCN“,DISKRETURN0函数名GETDRIVERNAME功能返回指向包含当前图形驱动程序名字的字符串指针用法CHARGETDRIVENAMEVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODE/STORESTHEDEVICEDRIVERNAME/CHARDRIVERNAME/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1SETCOLORGETMAXCOLOR/GETNAMEOFTHEDEVICEDRIVERINUSE/DRIVERNAMEGETDRIVERNAME/FORCENTERINGTEXTONTHESCREEN/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXT/OUTPUTTHENAMEOFTHEDRIVER/OUTTEXTXYGETMAXX/2,GETMAXY/2,DRIVERNAME/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETDTA功能取磁盘传输地址用法CHARFARGETDTAVOID程序例INCLUDEINCLUDEINTMAINVOIDCHARFARDTADTAGETDTAPRINTF“THECURRENTDISKTRANSFERADDRESSISFPN“,DTARETURN0函数名GETENV功能从环境中取字符串用法CHARGETENVCHARENVVAR程序例INCLUDEINCLUDEINTMAINVOIDCHARSSGETENV“COMSPEC“/GETTHECOMSPECENVIRONMENTPARAMETER/PRINTF“COMMANDPROCESSORSN“,S/DISPLAYCOMSPECPARAMETER/RETURN0函数名GETFAT,GETFATD功能取文件分配表信息用法VOIDGETFATINTDRIVE,STRUCTFATINFOFATBLKP程序例INCLUDEINCLUDEINTMAINVOIDSTRUCTFATINFODISKINFOINTFLAG0PRINTF“PLEASEINSERTDISKINDRIVEAN“GETCHARGETFAT1,/GETDRIVEINFORMATION/PRINTF“NDRIVEAIS“SWITCHUNSIGNEDCHARDISKINFOFI_FATIDCASE0XFDPRINTF“360KLOWDENSITYN“BREAKCASE0XF9PRINTF“12MEGHIGHDENSITYN“BREAKDEFAULTPRINTF“UNFORMATTEDN“FLAG1IFFLAGPRINTF“SECTORSPERCLUSTER5DN“,DISKINFOFI_SCLUSPRINTF“NUMBEROFCLUSTERS5DN“,DISKINFOFI_NCLUSPRINTF“BYTESPERSECTOR5DN“,DISKINFOFI_BYSECRETURN0函数名GETFILLPATTERN功能将用户定义的填充模式拷贝到内存中用法VOIDFARGETFILLPATTERNCHARFARUPATTERN程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMAXX,MAXYCHARPATTERN80X00,0X70,0X20,0X27,0X25,0X27,0X04,0X04/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MAXXGETMAXXMAXYGETMAXYSETCOLORGETMAXCOLOR/SELECTAUSERDEFINEDFILLPATTERN/SETFILLPATTERNPATTERN,GETMAXCOLOR/FILLTHESCREENWITHTHEPATTERN/BAR0,0,MAXX,MAXYGETCH/GETTHECURRENTUSERDEFINEDFILLPATTERN/GETFILLPATTERNPATTERN/ALTERTHEPATTERNWEGRABBED/PATTERN41PATTERN53PATTERN63PATTERN74/SELECTOURNEWPATTERN/SETFILLPATTERNPATTERN,GETMAXCOLOR/FILLTHESCREENWITHTHENEWPATTERN/BAR0,0,MAXX,MAXY/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETFILLSETTINGS功能取得有关当前填充模式和填充颜色的信息用法VOIDFARGETFILLSETTINGSSTRUCTFILLSETTINGSTYPEFARFILLINFO程序例INCLUDEINCLUDEINCLUDEINCLUDE/THENAMESOFTHEFILLSTYLESSUPPORTED/CHARFNAME“EMPTY_FILL“,“SOLID_FILL“,“LINE_FILL“,“LTSLASH_FILL“,“SLASH_FILL“,“BKSLASH_FILL“,“LTBKSLASH_FILL“,“HATCH_FILL“,“XHATCH_FILL“,“INTERLEAVE_FILL“,“WIDE_DOT_FILL“,“CLOSE_DOT_FILL“,“USER_FILL“INTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODESTRUCTFILLSETTINGSTYPEFILLINFOINTMIDX,MIDYCHARPATSTR40,COLSTR40/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/GETINFORMATIONABOUTCURRENTFILLPATTERNANDCOLOR/GETFILLSETTINGS/CONVERTFILLINFORMATIONINTOSTRINGS/SPRINTFPATSTR,“SISTHEFILLSTYLE“,FNAMEFILLINFOPATTERNSPRINTFCOLSTR,“DISTHEFILLCOLOR“,FILLINFOCOLOR/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,PATSTROUTTEXTXYMIDX,MIDY2TEXTHEIGHT“W“,COLSTR/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETFTIME功能取文件日期和时间用法INTGETFTIMEINTHANDLE,STRUCTFTIMEFTIMEP程序例INCLUDEINCLUDEINTMAINVOIDFILESTREAMSTRUCTFTIMEFTIFSTREAMFOPEN“TEST“,“WT“NULLFPRINTFSTDERR,“CANNOTOPENOUTPUTFILEN“RETURN1GETFTIMEFILENOSTREAM,PRINTF“FILETIMEUUUN“,FTFT_HOUR,FTFT_MIN,FTFT_TSEC2PRINTF“FILEDATEU/U/UN“,FTFT_MONTH,FTFT_DAY,FTFT_YEAR1980FCLOSESTREAMRETURN0函数名GETGRAPHMODE功能返回当前图形模式用法INTFARGETGRAPHMODEVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDY,MODECHARNUMNAME80,MODENAME80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1MIDXGETMAXX/2MIDYGETMAXY/2/GETMODENUMBERANDNAMESTRINGS/MODEGETGRAPHMODESPRINTFNUMNAME,“DISTHECURRENTMODENUMBER“,MODESPRINTFMODENAME,“SISTHECURRENTGRAPHICSMODE“,GETMODENAMEMODE/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,NUMNAMEOUTTEXTXYMIDX,MIDY2TEXTHEIGHT“W“,MODENAME/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETFTIME功能取文件日期和时间用法INTGETFTIMEINTHANDLE,STRUCTFTIMEFTIMEP程序例INCLUDEINCLUDEINTMAINVOIDFILESTREAMSTRUCTFTIMEFTIFSTREAMFOPEN“TEST“,“WT“NULLFPRINTFSTDERR,“CANNOTOPENOUTPUTFILEN“RETURN1GETFTIMEFILENOSTREAM,PRINTF“FILETIMEUUUN“,FTFT_HOUR,FTFT_MIN,FTFT_TSEC2PRINTF“FILEDATEU/U/UN“,FTFT_MONTH,FTFT_DAY,FTFT_YEAR1980FCLOSESTREAMRETURN0函数名GETGRAPHMODE功能返回当前图形模式用法INTFARGETGRAPHMODEVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDY,MODECHARNUMNAME80,MODENAME80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULT/ANERROROCCURRED/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCH/TERMINATEWITHANERRORCODE/EXIT1MIDXGETMAXX/2MIDYGETMAXY/2/GETMODENUMBERANDNAMESTRINGS/MODEGETGRAPHMODESPRINTFNUMNAME,“DISTHECURRENTMODENUMBER“,MODESPRINTFMODENAME,“SISTHECURRENTGRAPHICSMODE“,GETMODENAMEMODE/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,NUMNAMEOUTTEXTXYMIDX,MIDY2TEXTHEIGHT“W“,MODENAME/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETIMAGE功能将指定区域的一个位图存到主存中用法VOIDFARGETIMAGEINTLEFT,INTTOP,INTRIGHT,INTBOTTOM,VOIDFARBITMAP程序例INCLUDEINCLUDEINCLUDEINCLUDEINCLUDEVOIDSAVE_SCREENVOIDFARBUF4VOIDRESTORE_SCREENVOIDFARBUF4INTMAXX,MAXYINTMAINVOIDINTGDRIVERDETECT,GMODE,ERRORCODEVOIDFARPTR4/AUTODETECTTHEGRAPHICSDRIVERANDMODE/INITGRAPHERRORCODEGRAPHRESULT/CHECKFORANYERRORS/IFERRORCODEGROKPRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1MAXXGETMAXXMAXYGETMAXY/DRAWANIMAGEONTHESCREEN/RECTANGLE0,0,MAXX,MAXYLINE0,0,MAXX,MAXYLINE0,MAXY,MAXX,0SAVE_SCREENPTR/SAVETHECURRENTSCREEN/GETCH/PAUSESCREEN/CLEARDEVICE/CLEARSCREEN/RESTORE_SCREENPTR/RESTORETHESCREEN/GETCH/PAUSESCREEN/CLOSEGRAPHRETURN0VOIDSAVE_SCREENVOIDFARBUF4UNSIGNEDSIZEINTYSTART0,YEND,YINCR,BLOCKYINCRMAXY1/4YENDYINCRSIZEIMAGESIZE0,YSTART,MAXX,YEND/GETBYTESIZEOFIMAGE/FORBLOCK0BLOCK3BLOCKIFBUFBLOCKFARMALLOCSIZENULLCLOSEGRAPHPRINTF“ERRORNOTENOUGHHEAPSPACEINSAVE_SCREENN“EXIT1GETIMAGE0,YSTART,MAXX,YEND,BUFBLOCKYSTARTYEND1YENDYINCR1VOIDSAVE_SCREENVOIDFARBUF4UNSIGNEDSIZEINTYSTART0,YEND,YINCR,BLOCKYINCRMAXY1/4YENDYINCRSIZEIMAGESIZE0,YSTART,MAXX,YEND/GETBYTESIZEOFIMAGE/FORBLOCK0BLOCK3BLOCKIFBUFBLOCKFARMALLOCSIZENULLCLOSEGRAPHPRINTF“ERRORNOTENOUGHHEAPSPACEINSAVE_SCREENN“EXIT1GETIMAGE0,YSTART,MAXX,YEND,BUFBLOCKYSTARTYEND1YENDYINCR1VOIDRESTORE_SCREENVOIDFARBUF4INTYSTART0,YEND,YINCR,BLOCKYINCRMAXY1/4YENDYINCRFORBLOCK0BLOCK3BLOCKPUTIMAGE0,YSTART,BUFBLOCK,COPY_PUTFARFREEBUFBLOCKYSTARTYEND1YENDYINCR1函数名GETLINESETTINGS功能取当前线型、模式和宽度用法VOIDFARGETLINESETTINGSSTRUCTLINESETTINGSTYPEFARLININFO程序例INCLUDEINCLUDEINCLUDEINCLUDE/THENAMESOFTHELINESTYLESSUPPORTED/CHARLNAME“SOLID_LINE“,“DOTTED_LINE“,“CENTER_LINE“,“DASHED_LINE“,“USERBIT_LINE“INTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODESTRUCTLINESETTINGSTYPELINEINFOINTMIDX,MIDYCHARLSTYLE80,LPATTERN80,LWIDTH80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/GETINFORMATIONABOUTCURRENTLINESETTINGS/GETLINESETTINGS/CONVERTLINEINFORMATIONINTOSTRINGS/SPRINTFLSTYLE,“SISTHELINESTYLE“,LNAMELINEINFOLINESTYLESPRINTFLPATTERN,“0XXISTHEUSERDEFINEDLINEPATTERN“,LINEINFOUPATTERNSPRINTFLWIDTH,“DISTHELINETHICKNESS“,LINEINFOTHICKNESS/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,LSTYLEOUTTEXTXYMIDX,MIDY2TEXTHEIGHT“W“,LPATTERNOUTTEXTXYMIDX,MIDY4TEXTHEIGHT“W“,LWIDTH/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETMAXCOLOR功能返回可以传给函数SETCOLOR的最大颜色值用法INTFARGETMAXCOLORVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDYCHARCOLSTR80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/GRABTHECOLORINFOANDCONVERTITTOASTRING/SPRINTFCOLSTR,“THISMODESUPPORTSCOLORS0D“,GETMAXCOLOR/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,COLSTR/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETMAXX功能返回屏幕的最大X坐标用法INTFARGETMAXXVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDYCHARXRANGE80,YRANGE80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/CONVERTMAXRESOLUTIONVALUESINTOSTRINGS/SPRINTFXRANGE,“XVALUESRANGEFROM0D“,GETMAXXSPRINTFYRANGE,“YVALUESRANGEFROM0D“,GETMAXY/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,XRANGEOUTTEXTXYMIDX,MIDYTEXTHEIGHT“W“,YRANGE/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETMAXY功能返回屏幕的最大Y坐标用法INTFARGETMAXYVOID程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDYCHARXRANGE80,YRANGE80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/CONVERTMAXRESOLUTIONVALUESINTOSTRINGS/SPRINTFXRANGE,“XVALUESRANGEFROM0D“,GETMAXXSPRINTFYRANGE,“YVALUESRANGEFROM0D“,GETMAXY/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,XRANGEOUTTEXTXYMIDX,MIDYTEXTHEIGHT“W“,YRANGE/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETMODENAME功能返回含有指定图形模式名的字符串指针用法CHARFARGETMODENAMEINTMODE_NAME程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDY,MODECHARNUMNAME80,MODENAME80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/GETMODENUMBERANDNAMESTRINGS/MODEGETGRAPHMODESPRINTFNUMNAME,“DISTHECURRENTMODENUMBER“,MODESPRINTFMODENAME,“SISTHECURRENTGRAPHICSMODE“,GETMODENAMEMODE/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,NUMNAMEOUTTEXTXYMIDX,MIDY2TEXTHEIGHT“W“,MODENAME/CLEANUP/GETCHCLOSEGRAPHRETURN0函数名GETMODERANGE功能取给定图形驱动程序的模式范围用法VOIDFARGETMODERANGEINTGRAPHDRIVER,INTFARLOMODE,INTFARHIMODE程序例INCLUDEINCLUDEINCLUDEINCLUDEINTMAINVOID/REQUESTAUTODETECTION/INTGDRIVERDETECT,GMODE,ERRORCODEINTMIDX,MIDYINTLOW,HIGHCHARMRANGE80/INITIALIZEGRAPHICSANDLOCALVARIABLES/INITGRAPH/READRESULTOFINITIALIZATION/ERRORCODEGRAPHRESULTIFERRORCODEGROK/ANERROROCCURRED/PRINTF“GRAPHICSERRORSN“,GRAPHERRORMSGERRORCODEPRINTF“PRESSANYKEYTOHALT“GETCHEXIT1/TERMINATEWITHANERRORCODE/MIDXGETMAXX/2MIDYGETMAXY/2/GETTHEMODERANGEFORTHISDRIVER/GETMODERANGEGDRIVER,/CONVERTMODERANGEINFOINTOSTRINGS/SPRINTFMRANGE,“THISDRIVERSUPPORTSMODESDD“,LOW,HIGH/DISPLAYTHEINFORMATION/SETTEXTJUSTIFYCENTER_TEXT,CENTER_TEXTOUTTEXTXYMIDX,MIDY,MRANGE/CLEANUP/GETCHCLOSEGRAPHRET
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 河北省霸州市2025年上半年事业单位公开遴选试题含答案分析
- 2025版龙门吊拆除现场安全管理及应急预案合同
- 2025年度户外运动设施防水施工及十年质保协议
- 2025版活动赞助商权益保障合同范本下载
- 2025年度体育场馆建设人工劳务外包合同模板
- 2025年度综合商业体短期租赁合同书
- 贵州省玉屏侗族自治县2025年上半年事业单位公开遴选试题含答案分析
- 2025电机产品国际认证与出口服务合同书
- 2025年度能源行业财务风险控制合同
- 贵州省凤冈县2025年上半年公开招聘村务工作者试题含答案分析
- GB/T 3799.1-2005商用汽车发动机大修竣工出厂技术条件第1部分:汽油发动机
- 小学音乐《村晚》优质课件设计
- 东锅300MW锅炉说明书
- 咯血(课件幻灯)
- 部门会签单模板
- 2023版初中化学跨学科实践活动(化学)
- 上海市环卫作业养护预算定额经费
- 宫颈环扎术护理常规
- G12《贷款质量迁徙情况表》填报说明
- 县城市管理领域集中行使行政处罚权工作衔接规范(试行)
- 九年级初三英语七选五专练1(10篇带答案)-
评论
0/150
提交评论