Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101890955
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: C/C++

2008-05-18 17:59:01

  来源:


  getenv()读取环境变量的当前值的函数

  原形:char *getenv(const char *name)

  用法:s=getenv("环境变量名");

  需先定义char *s;

  功能:返回一给定的环境变量值,环境变量名可大写或小写。如果指定的变量在环境中未定义,则返回一空串。

  头文件:stdlib.h

  getimage()将指定区域的位图象存入内存的函数

  原形:void far getimage(int left,int top,int right,int bottom,void far *bitmap)

  功能:将图像(矩形区域)从屏幕拷贝到内存,*bitmap指向内存中存放图像的区域。该区域的前两个字节用于存放矩形的高和宽。

  头文件:graphics.h

  getmaxx()返回屏幕上最大的X坐标值的函数

  原形:int far getmaxx(void)

  功能:返回当前图形驱动程序和图形模式下最大的X坐标值。

  头文件:graphics.h

  getmaxy()返回屏幕上最大的Y坐标值的函数

  原形:int far getmaxy(void)

  功能:返回当前图形驱动程序和图形模式下最大的Y坐标值。

  头文件:graphics.h

  getpixel()读取像素颜色的函数

  原形:unsigned far getpixel(int x,int y)

  头文件:graphics.h

  getpsp()

  原形∶unsigned getpsp(void)

  功能∶使用DOS系统调用0x62,返回程序段前缀(PSP)的段地址

  头文件∶dos.h

  gets()从标准输入流stdio中读取一字符串的函数

  功能:将键盘上输入的字符串立刻赋予字符串变量并显示出来

  调用方式:gets(字符串变量名)

  注:需定义 char *字符串变量名;

  gettime()读取系统的函数

  原形:void gettime(ptime)

  struct time

  {

  unsigned char ti_min;

  unsigned char ti_hour;

  unsigned char ti_hund;//百分之一秒

  unsigned char ti_sec;

  };

  struct time *ptime;

  getvect()读取中断向量函数

  原形:void interrupt(*getvect(int interruptno))

  功能:读入由interruptno(0-255之间)所指定的中断向量值,并把该中断向量值作为中断函数的远指针返回。

  返回值:指定中断向量的当前4字节值。

  头文件:dos.h

  使用实例:oldfunc=getvect(5);

  先定义void interrupt(*oldfunc)();

  用后恢复setvect(5,oldfunc);

  getx()返回当前图形方式下位置的X坐标值的函数

  原形:int far getx(void);

  头文件:graphics.h

  gety()返回当前图形方式下位置的Y坐标值的函数

  原形:int far gety(void);

  头文件:graphics.h

  imagesize()返回保存图像缓冲区大小的函数

  原形:unsigned far imagesize(int left,int top,int right,int bottom)

  功能:确定保存图像所需的存储区大小。

  返回值:返回存储区的大小(字节),若所需内存大于等于64K-1字节,则返回0xffff(-1)。

  头文件:graphics.h

阅读(217) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~