SETWSIZEQQ

QuickWin Function: Sets the size and position of a window.

Module: USE DFLIB

Syntax

result = SETWSIZEQQ (unit, winfo)

unit
(Input) INTEGER(4). Specifies the window unit. Unit numbers 0, 5, and 6 refer to the default startup window only if the program does not explicitly open them with the OPEN statement. To set the size of the frame window (as opposed to a child window), set unit to the symbolic constant QWIN$FRAMEWINDOW (defined in DFLIB.F90 in the \DF98\INCLUDE subdirectory).

When called from INITIALSETTINGS, SETWSIZEQQ behaves slightly differently than when called from a user routine after initialization. See below under Results.

winfo
(Input) Derived type qwinfo. Physical coordinates of the window's upper-left corner, and the current or maximum height and width of the window's client area (the area within the frame). The derived type qwinfo is defined in DFLIB.F90 as follows:
 TYPE QWINFO
    INTEGER(2) TYPE  ! request type
    INTEGER(2) X     ! x coordinate for upper left
    INTEGER(2) Y     ! y coordinate for upper left
    INTEGER(2) H     ! window height
    INTEGER(2) W     ! window width
 END TYPE QWINFO

This function's behavior depends on the value of QWINFO%TYPE, which can be any of the following:

Results:

The result is of type INTEGER(4). The result is zero if successful; otherwise, nonzero (unless called from INITIALSETTINGS). If called from INITIALSETTINGS, the following occurs:

The position and dimensions of 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 height and width specified for a frame window reflects the actual size in pixels of the frame window including any borders, menus, and status bar at the bottom.

Compatibility

QUICKWIN GRAPHICS LIB

See Also: Using QuickWin, GETWSIZEQQ, INITIALSETTINGS

Example

 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