home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exc.arj / TEMP / 07-04.C < prev    next >
Text File  |  1995-01-20  |  437b  |  27 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3.  
  4. void main(void);
  5.  
  6. void main()
  7. {
  8.    int attr, value;
  9.    int old_mode;
  10.  
  11.    fg_initpm();
  12.    old_mode = fg_getmode();
  13.    fg_setmode(3);
  14.    fg_cursor(0);
  15.  
  16.    fg_setattr(9,7,0);
  17.    fg_locate(24,0);
  18.    fg_text("Test",4);
  19.    value = fg_getchar(24,0);
  20.    attr  = fg_getattr(24,0);
  21.    fg_waitkey();
  22.  
  23.    fg_setmode(old_mode);
  24.    fg_reset();
  25.    printf("%c %2.2X\n",value,attr);
  26. }
  27.