ID 757211
Date 7/23/2021
Public

## Controlling Size and Position of Windows

SETWSIZEQQ and GETWSIZEQQ set and get the size and position of the visible representation of a window. The positions and dimensions of visible child windows are expressed in units of character height and width. The position and dimensions of the frame window are expressed in screen pixels. The position and dimensions are returned in the derived type qwinfo defined in IFQWIN.MOD as follows:

  TYPE QWINFO
INTEGER(2) TYPE     ! Type of action performed by SETWSIZEQQ.
INTEGER(2) X        ! x-coordinate for upper left corner.
INTEGER(2) Y        ! y-coordinate for upper left corner.
INTEGER(2) H        ! Window height.
INTEGER(2) W        ! Window width.
END TYPE QWINFO

The options for the qwinfo type are listed under SETWSIZEQQ in the Language Reference.

GETWSIZEQQ returns the position and the current or maximum window size of the current frame or child window. To access information about a child window, specify the unit number associated with it. Unit numbers 0, 5, and 6 refer to the default startup window if you have not explicitly opened them with the OPEN statement. To access information about the frame window, specify the unit number as the symbolic constant QWIN$FRAMEWINDOW. For example:  USE IFQWIN INTEGER status TYPE (QWINFO) winfo OPEN (4, FILE='USER') ... ! Get current size of child window associated with unit 4. status = GETWSIZEQQ(4, QWIN$SIZECURR, winfo)
WRITE (*,*) "Child window size is ", winfo.H, " by ", winfo.W
! Get maximum size of frame window.
status = GETWSIZEQQ(QWIN$FRAMEWINDOW, QWIN$SIZEMAX, winfo)
WRITE (*,*) "Max frame window size is ", winfo.H, " by ", winfo.W

SETWSIZEQQ is used to set the visible window position and size. For example:

   USE IFQWIN
INTEGER status
TYPE (QWINFO) winfo
OPEN (4, FILE='USER')
winfo.H    = 30
winfo.W    = 80
winfo.TYPE = QWIN\$SET
status     = SETWSIZEQQ(4, winfo)

Did you find the information on this page useful?

Characters remaining:

Feedback Message