* :--------------------------------------- * ------------------------: Window Position API * :--------------------------------------- * : This API is not normally used for * : GUI ScreenIO applications and is * : intended for specialized situations * : or interactions with other * : applications. * : * : * : This copybook is used for the * : Window Position API. This API is * : a wrapper around Microsoft's * : SetWindowPosition system call, with * : enough protection built in to preserve * : the integrity of GUI ScreenIO. * : We do not provide all functionality * : and we place limitation on which * : operations we will honor and which * : windows you can manipulate with this * : API. * : * : The term Window used herein means * : panel, popup, propertysheet or other * : application. * : * : This API is useful for moving windows * : and setting the Z-Order, (layering) of * : windows (Both Gui ScreenIO windows and * : any other window for which you have * : the Hwnd. * : * : We prevent the resizing of windows. * : * : You must call this function with the * : Hwnd of the panel you wish to operate * : upon. Operations on base panels is * : treated as if you had supplied the * : hwnd of the main container. * : * : Arguments: * : HWND This is field is supplied to you * : by GUI ScreenIO in the Panel-1 area. * : It designates the window you wish to * : manipulate. * : * : HWND-OTHER This is the HWND of another * : window (either another GUI ScreenIO * : window or some other application), OR * : it may include one of the special 88 * : values in the copybook to specify * : predefined operationd. * : * : X and Y, specify the new location of * : the window if it is to be moved. If * : zero, the window will not be moved. * : If the window is not moved, you can * : only manipulate the Z-Order. * : * : After callin this API, GUI ScreenIO * : will not activate the Window, because * : doing so would reset the Z order and * : bring the window to the top. * : * : NOTE: * : As soon as you Call GUI ScreenIO with * : this or any other panel the Z order * : set by this call is over-ridden, as * : GUI ScreenIO always forces the current * : Panel to the top of the Z-Order. * : * : Therefore, the principal use of this * : API is to move windows, or to change * : the Z-order of GUI ScreenIO so that * : other applications can come to the * : top (by setting hwnd-bottom, or Hwnd- * : nottopmost). * : * : This can be useful if you wish to * : launch another application, and have * : it take the foreground. This would * : involve setting the Main Container of * : GUI ScreenIO using Hwind-Bottom, and * : then launching the other application * : (perhaps by using winexec API). * : You must NOT call GUI ScreenIO with * : another panel until the launched * : application has focus, or, preferably * : until the application has finished. * : * : This API can monipulate other windows * : from other applications if you obtain * : the HWND from those windows and if * : if your application has the propper * : permissions. * : * To use: * * COPY WIN32API. * COPY WINPOS. * * --- --- Typical call ------------------------- * * : Set the z-order to the bottom * SET WINPOS-HWND-BOTTOM TO TRUE * MOVE ZERO TO WINPOS-X WINPOS-Y * : Set the function * SET API-WINDOW-POSITION TO TRUE * CALL 'GSWINAPI' USING WIN32API-PARMS * WINDOWS-POSITION-PARMS * WIN32API-B * WIN32API-C * WIN32API-D * WIN32API-E * WIN32API-F * * ---------------------------------------------------------------- 01 WINDOWS-POSITION-PARMS. 05 WINPOS-HWND PIC X(4). * : To place the above window relative to * : another window, put the other window's * : HWND below. Or use 88s to set generic * : positioning. 05 WINPOS-HWND-OTHER. 10 WINPOS-HWND-OTHER-NUMERIC PIC S9(9) COMP-5. 88 WINPOS-HWND-BOTTOM VALUE 1. 88 WINPOS-HWND-NOTTOPMOST VALUE -2. 88 WINPOS-HWND-TOP VALUE 0. * : Topmost persists even when the window * : is deactivated. Supersceded only by * : other topmost windows. 88 WINPOS-HWND-TOPMOST VALUE -1. 05 WINPOS-X PIC S9(9) COMP-5 VALUE ZERO. 05 WINPOS-Y PIC S9(9) COMP-5 VALUE ZERO.