Positions and resizes a file view in the Source view or the Editor window.
Scope: View
Syntax
query windowpos
set windowpos X Y [CX CY]
Options
X Y |
Coordinates determining the position of the lower left corner. |
CX CY |
Coordinates determining the size of the file view. |
Description
The windowpos parameter positions and resizes the file view. The parameters are given in pels. X and Y set the position of the lower left corner, while CX and CY set the width and depth. If X & Y are set to -1 the view can be resized without changing its location. If CX and CY are omitted or set to zero, the view is not resized. Setting both CX and CY to -1 iconifies the view (X and Y are ignored).
There are a multitude of factors that govern exactly where on the screen a file view may be placed. When you ask the Editor to place the view at a certain location, it will do it's best to satisfy all the constraints and position the view as close to the location you specified as possible. You might want to issue query windowpos after each set windowpos to determine the exact location of the view.
Some part of the file view must be visible on the desktop (whose size can be obtained by query screen).
Example
set windowpos 23 34
The lower left corner of the view is placed at 23 pels across and 34 pels from the top. Because CX and CY are omitted, the view cannot be resized.
set windowpos 4 512 1011 252
The lower left corner of the view is placed at 4 pels across and 512 pels from the top. The frame of the view is 1011 pels wide and 252 pels deep.
API Return Codes
-2 |
The coordinates placed the entire view outside the desktop. Issue the command again using position and size coordinates that place the view within the desktop. |
![]()
