home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FSGFX.ZIP / TESTGRAP.C < prev    next >
C/C++ Source or Header  |  1990-03-07  |  926b  |  43 lines

  1. /* testgrap.c */
  2. /* get basic graphics and mouse happening */
  3. #include <stdio.h>
  4. #include "mygraph.h" 
  5. #include "mymouse.h" 
  6. #include "myproc.h"
  7.  
  8. struct rect outtahere;
  9. struct rect findafile;
  10. main()
  11. {
  12.     int button;
  13.     struct point pt;
  14.     char temp[80];
  15.     char temp1[80];
  16.     g_setgph();
  17.     msinitgrph();
  18.     g_puts(0,0,"Hey and Hello. Funny font with 640 x 350 OS/2 "
  19.         "full screen graphics");
  20.     g_puts(0,16,"Direct screen writing is used, so non standard"
  21.         " video modes can be supported.");
  22.     g_puts(0,32,"Threads are created for session switch, mode change"
  23.         " and mouse drawing");
  24.  
  25.         outtahere = g_drwbtn(100,100,"exit","");
  26.         findafile = g_drwbtn(400,320,"Find a File","");
  27.     g_line(50,50,200,100);
  28.     for( ; ; )
  29.     {
  30.         while(button == 0)
  31.             msstatus(button,pt);
  32.         if(ptinrect(pt,outtahere))
  33.             exit(0);
  34.         else if(ptinrect(pt,findafile))
  35.             g_fselect("*",temp);
  36.         button = 0;
  37.     
  38.     }
  39.     g_rmode();
  40. }
  41.  
  42.  
  43.