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.

Remarks

None.

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
RETURN

See Also

BBjAPI

BBjSysGui

BBjWindow

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