BBjControl::getContextID

Description

Returns the context ID of the BBjControl.

Syntax

Return Value Method
int getContextID()

Parameters

None.

Return Value

Returns the context ID of the BBjControl.

Example

rem 'Get context of windows and controls

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBJAPI()

rem 'Open the SysGui device
let SYSGUI = UNT
OPEN (SYSGUI)"X0"

rem 'Obtain the instance of the BBjSysGui object
let mySysGui! = myAPI!.getSysGui()

rem 'Set addWindow param values
let X = 10
let Y = 10
let WIDTH = 200
let HEIGHT = 200
let TITLE$="BBj Window"

rem 'Create a top level window
let myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$)

rem 'Add a button on the window
let topButton! = myWindow!.addButton(101,55,10,90,30,"Button")

rem 'Create a child window
let myChildWindow! = myWindow!.addChildWindow(200,50,50,100,100,"",$$,1,$$)

rem 'Add a button on the child window
let childButton! = myChildWindow!.addButton(201,5,40,90,30,"Button")
PRINT "parentContext: ",myWindow!.getContextID()
PRINT "childContext: ",myChildWindow!.getContextID()
PRINT "topButtonContext: ",topButton!.getContextID()
PRINT "childButtonContext: ",childButton!.getContextID()

rem 'Register the CALLBACK routines
CALLBACK(ON_CLOSE,APP_CLOSE,PARENT_CONTEXT)

rem 'Process Events
process_events

rem 'Callback routine called when the user closes the application window
APP_CLOSE:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.