PF-Get-First-Panel (Value 15)

Returns the identifying handle and information about the panel that was enabled most recently.

Parameters:

Panel-Name-Buffer. Group item containing:
Panel-Name-Length    pic 99 comp-x.
Panel-Name-Text      pic x(30).
PPB-First-Visible-Col pic 9(4) comp-x.
PPB-First-Visible-Row pic 9(4) comp-x.
PPB-Panel-Height pic 9(4) comp-x.
PPB-Panel-ID pic 9(4) comp-x.
PPB-Panel-Start-Column pic 9(4) comp-x.
PPB-Panel-Start-Row pic 9(4) comp-x.
PPB-Panel-Width pic 9(4) comp-x.
PPB-Visible-Height pic 9(4) comp-x.
PPB-Visible-Width pic 9(4) comp-x.

On Entry:

None

On Exit:

Panel-Name-Length The length of the name associated with the panel.
Panel-Name-Text The name associated with the panel by a call to function PF-Set-Panel-Name.
PPB-First-Visible-Col The horizontal position of the visible window on the panel.
PPB-First-Visible-Row The vertical position of the visible window on the panel.
PPB-Panel-Height The height of the panel.
PPB-Panel-ID The identifying handle of the panel that was enabled most recently.
PPB-Panel-Start-Column The horizontal position of the panel on the screen.
PPB-Panel-Start-Row The vertical position of the panel on the screen.
PPB-Panel-Width The width of the panel.
PPB-Visible-Height The height of the visible window in the panel.
PPB-Visible-Width The width of the visible window in the panel.

Comments:

On exit from this function, the most significant bit of Panel-Name-Length is a flag that indicates whether or not the panel is currently enabled - zero indicates that the panel is not enabled, while a non-zero value shows that it is enabled. To check whether this is the case, you should check whether Panel-Name-Length > 127.

If there are no panels when you call PF-Get-First-Panel, PPB-Status contains the value Error-Invalid-ID.

Example:

This example assumes that you have defined Panel-Name-Buffer in the Working-Storage Section of your program as specified above.

       move pf-set-panel-name to ppb-function.
       call "PANELS" using panels-parameter-block
                              panel-name-buffer.
*
* code to check if the panel is enabled.
*       if ppb-status not = zero
*         (code to abort)