home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 568a.lha / APIG_v1.1 / e7_images.rexx < prev    next >
OS/2 REXX Batch file  |  1991-09-28  |  1KB  |  62 lines

  1. /*   */
  2.  
  3. /*  */
  4.  x = addlib("apig.library",0,-30,0)
  5.  
  6.  portname = "example7_port"
  7.  p = openport(portname)
  8.  call set_apig_globals()
  9.  
  10.  scrtitle = "Hey Buddy, Yea You,  This is Your New Screen  !"
  11.  wintitle = "This is your title"
  12.  winidcmp = CLOSEWINDOW
  13.  winflags = WINDOWCLOSE+WINDOWDRAG+WINDOWSIZING+WINDOWDEPTH+GIMMEZEROZERO
  14.  
  15.  scr = openscreen(0,0,640,400,3,4,5,LACE+HIRES,CUSTOMSCREEN,scrtitle)
  16.  
  17.  /* open window */
  18.  w1  = openwindow(portname,0,0,640,400,2,4,winidcmp,winflags,wintitle,scr,0,0,0)
  19.   rpw1  = getwindowrastport(w1) 
  20.   image = loadimage("octalbuttonbitmap",0,0,0)
  21.  
  22.   x = drawimage(rpw1,image,270,90)
  23.  
  24.   z = pitext(rpw1,200,112,"This is small a IFF image",1,2,JAM2,0,0)
  25.   wait 2 secs
  26.   z = clearscreen(rpw1,0,0)
  27.  
  28.   do x = 10 to 600 by 50
  29.      do y = 10 to 380 by 16
  30.         z = drawimage(rpw1,image,x,y)
  31.      end
  32.   end
  33. wait 1 secs
  34. z = pitext(rpw1,250,112,"Im DONE ...",1,2,JAM2,0,0)
  35. z = pitext(rpw1,180,122,"You Can Close The Window Now",1,2,JAM2,0,0)
  36.  
  37. exitme = 0
  38. do forever
  39.  
  40.      x = waitpkt(portname)
  41.   
  42.      do forever 
  43.         msg = getpkt(portname)
  44.         if msg = '0000 0000'x then leave
  45.         class = getarg(msg,0)
  46.         if class = CLOSEWINDOW then exitme = 1
  47.         x = reply(msg,0)  
  48.      end  
  49.    if exitme = 1 then leave
  50.    
  51. end
  52.  
  53.   x = freeimage(image)
  54.   say " x = " x   
  55.   
  56.  
  57.  
  58.  
  59.   a =closewindow(w1)
  60.   a =closescreen(scr)
  61.   exit
  62.