home *** CD-ROM | disk | FTP | other *** search
/ MS DOS Archives 1 / MS-DOS_Archives_Volume_One_Walnut_Creek.iso / msdos / graphics / hgrph101.arc / DEMO1.C < prev    next >
C/C++ Source or Header  |  1989-02-25  |  1KB  |  47 lines

  1.  
  2.  
  3.  
  4.           /* DEMO1.C - a demo of hgraph.lib's string writing routines */
  5.  
  6.           #include <string.h>
  7.           #include <conio.h>
  8.           #include "hgraph.h"
  9.  
  10.           char string[40] = "HGRAPH.LIB";
  11.  
  12.           main()
  13.           {
  14.           int ct;
  15.           char c;
  16.  
  17.                   ct = strlen(string);
  18.                   hgraph_init();
  19.                   hgmode_nc();
  20.                   hclearpg();
  21.                   hshowpg();
  22.  
  23.  
  24.                hstr(40, 1, string, HGINVS, ct);
  25.                hstr(20, 10,
  26.                 "This is a demo of hstr, hchar, and hchar2", HGNORM, 41);
  27.                hstr(10, 20,
  28.                 "This is a sample of hstr with normal attrib", HGNORM,43);
  29.                hstr(10, 21,
  30.                 "This is a sample of hstr with inverse attrib", HGINVS,44);
  31.                hchar(80, 200,
  32.                 "This is a sample of hchar with normal attrib", HGNORM,44);
  33.                hchar(80, 209,
  34.                 "This is a sample of hchar with inverse attrib",HGINVS,45);
  35.                hchar2(80, 240,
  36.                 "This is a sample of hchar2 with normal attrib",HGNORM,45);
  37.                hchar2(80, 249,
  38.                 "This is a sample of hchar2 with inverse attrib",HGINVS,46);
  39.  
  40.  
  41.                hstr(10, 40,
  42.                     "Press any key to continue ...", HGNORM, 29);
  43.                    getch();
  44.                htmode_nc();
  45.           }
  46.  
  47.