Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28629 Discussions

Understanding Screen Control in Compaq Fortran

john_humble1
Beginner
370 Views
Under Developer Studio I have several Quickwin Compaq Fortran programs that produce data plots. Each plot appears in its own window. My problem is how to control the position and size of the window. At present they generally overlap the controlling window where the user enters parameters. They also have to be manually maximised each time.

As a start, I've tried manipulating window size by the following test program. However, regardless of the values I try for h and w the screen always opens at the same size. Until I understand this there's no point in trying to go further.Would someone be able to help me?

TIA
John

program test_windows

Use DFLIB

type (qwinfo) winfo
integer*4result

unit = 0
winfo%type = 0
winfo%x = 50
winfo%y = 50
winfo%h = 50
winfo%w = 200
result = setwsizeqq(0, winfo)
type *, 'A test window'

end program
0 Kudos
2 Replies
anthonyrichards
New Contributor III
370 Views

According to my reading of the Help for SETWSIZEQQ, the TYPE should be non-zero, try QWIN$SET and if you want to change the main window, you should use QWIN$FRAMEWINDOW as the unit number. From the Help:

Code:

 USE DFLIB
 LOGICAL(4)     result
 INTEGER(2)     numfonts, fontnum
 TYPE (qwinfo)  winfo
 TYPE (xycoord) pos
 ! Maximize frame window
 winfo%TYPE = QWIN$MAX
 result =     SETWSIZEQQ(QWIN$FRAMEWINDOW, winfo)
 ! Maximize child window
 result =   SETWSIZEQQ(0, winfo)
 numfonts = INITIALIZEFONTS( )
 fontnum =  SETFONT ('t''Arial''h50w34i')
 CALL MOVETO (INT2(10), INT2(30), pos)
 CALL OUTGTEXT("BIG Window")
 END



0 Kudos
john_humble1
Beginner
370 Views
Thank you Anthony. I'd seen that Help but had totally misinterprted it. It worked first time! John
0 Kudos
Reply