home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / mslang / ribar / ribar.for < prev   
Text File  |  1994-03-01  |  3KB  |  155 lines

  1.     INCLUDE 'FGRAPH.FI'
  2.     INCLUDE 'FLIB.FI'
  3.  
  4.     Program QW03G
  5.  
  6.     INTEGER*2 Status      ! Return status
  7.  
  8.     INTEGER*2 I, J          ! Loop variables
  9.     INTEGER*2 MaxX, MaxY  ! Size of display area
  10.  
  11.     INTEGER*2 MainUnit    !    Base text handle
  12.  
  13.  
  14.     INTEGER*2 MainHandle  ! Base graphics handle
  15.     INTEGER*2 w1,w2,w3,w4 ! Child handles
  16.  
  17.     INCLUDE 'FGRAPH.FD'
  18.     INCLUDE 'FLIB.FD'
  19.  
  20.  
  21.     RECORD /XYCoord/   LastCoord
  22.  
  23.     RECORD /QWInfo/       MyTextwin
  24.  
  25.  
  26.  
  27. C    Determine the Unit=* window handle and minimize it
  28.       Status=InqFocusQQ(MainUnit)
  29.  
  30.       MyTextwin.Type= QWIN$Min
  31.  
  32.       Status=SetWSizeQQ(MainUnit,MyTextWin)
  33.  
  34.  
  35. C    Determine base graphics window handle, and close it
  36.       MainHandle=WGGetActiveQQ()
  37.  
  38.       Status = WGCloseQQ( MainHandle )
  39.  
  40.  
  41. C    Set maximum values, based on VGA resolution
  42.        MaxX = 639
  43.        MaxY = 479
  44.  
  45.  
  46. C    Open four display windows
  47.     w1   = WGOpenQQ( 'Gfx 1'C )
  48.     w2   = WGOpenQQ( 'Gfx 2'C )
  49.     w3   = wGOpenQQ( 'Gfx 3'C )
  50.     w4   = WGOpenQQ( 'Gfx 4'C )
  51.  
  52. C    Select the color for drawing
  53.       Status=SetColor($LightCyan)
  54.  
  55.  
  56. C    Tile the default text and graphics child windows so
  57. C    they can be read easier.
  58.      Status=ClickQQ( QWIN$Tile)
  59.  
  60.  
  61.       DO I=1,4
  62.        SELECT CASE (I)
  63.  
  64.  
  65.       CASE(1)
  66.  
  67. C    Activate the window and set the video mode
  68.     Status = WGSetActiveQQ( w1 )
  69.     Status = SetVideoMode ($MaxColorMode)
  70. C              Select the color for drawing
  71.     Status = SetColor($LightCyan)
  72.       DO J=0,MaxY,10
  73.     CALL MoveTo ( 0, 0, LastCoord)
  74.     Status=    LineTo (MaxX, J)
  75.       END DO
  76.  
  77.       DO J=MaxX,0, -10
  78.     CALL MoveTo( 0, 0, LastCoord)
  79.     Status = LineTo( J, MaxY )
  80.       END DO
  81.  
  82.  
  83.       CASE (2)
  84.  
  85. C    Activate the window and set the video mode
  86.       Status = WGSetActiveQQ( w2 )
  87.  
  88.       Status =  SetVideoMode ($MaxResMode)
  89. C     Select the color for drawing
  90.       Status =  SetColor($Yellow)
  91.           DO J=0,MaxY,10
  92.           CALL MoveTo( MaxX, 0, LastCoord)
  93.           Status = LineTo ( 0, J )
  94.           END DO
  95.       DO J=0,MaxX,10
  96.           CALL MoveTo ( MaxX, 0, LastCoord )
  97.           Status = LineTo(J, MaxY )
  98.           END DO
  99.  
  100.  
  101.       CASE (3)
  102.  
  103. C    Activate the window and set the video mode
  104.      Status = WGSetActiveQQ( w3)
  105.      Status = SetVideoMode ($VRes16Color)
  106. C               Select the color for drawing
  107.  
  108.       Status = SetColor($Brown)
  109.  
  110.       DO J=MaxY,0,-10
  111.  
  112.      CALL MoveTo(MaxX, MaxY, LastCoord)
  113.      Status = LineTo(0, J)
  114.  
  115.       END DO
  116.  
  117.        DO J=0,MaxX,10
  118.  
  119.     CALL MoveTo( MaxX, MaxY, LastCoord)
  120.     Status = LineTo(J, 0)
  121.  
  122.     END DO
  123.  
  124.  
  125.       CASE (4)
  126.  
  127. C     Activate the window and set the video mode
  128.  
  129.       Status = WGSetActiveQQ( w4 )
  130.       Status = SetvideoMode ($MRes256Color)
  131.  
  132. C     Select the color for drawing
  133.       Status = SetColor($LightRed)
  134.  
  135.       DO J=0,MaxX,10
  136.        CALL MoveTo (0, MaxY, LastCoord)
  137.        Status = LineTo(J, 0)
  138.  
  139.       END DO
  140.  
  141.       DO J=0,MaxY,10
  142.  
  143.        CALL MoveTo( 0, MaxY, LastCoord)
  144.        Status = LineTo( MaxX, J)
  145.  
  146.        END DO
  147.  
  148.  
  149.     END SELECT
  150.  
  151.        END DO
  152.  
  153.  
  154.        END
  155.