BBjSysGui::getContext

Description

Returns the context associated with the current window of the SysGui device.

Syntax

Return Value

Method

int

getContext()

Parameters

None.

Return Value

Returns the ID of the current context.

Remarks

If an empty context has not been set before calling this method, then the context will automatically be set to the next available context ID. The context can be retrieved using BBjSysGui::getContext().

Example

REM Get the current context of the SysGui device

REM Obtain the instance of the BBjAPI object
LET myAPI!=BBjAPI()

REM Open the SysGui device
SYSGUI=UNT
OPEN (SYSGUI) "X0"

REM Obtain the instance of the BBjSysGui object
LET mySysGui!=myAPI!.getSysGui()

REM Set common addWindow param values
X=10
Y=10
WIDTH=200
HEIGHT=200
TITLE$="BBjWindow Example"
CONTEXT=10

REM Create a window with a title in the specified context
myWindow! = mySysGui!.addWindow(CONTEXT,X,Y,WIDTH,HEIGHT,TITLE$)

REM Set the current context
mySysGui!.setContext(CONTEXT)

REM Get the current context, this should return 10
CUR_CONTEXT = NUM(mySysGui!.getContext())

See Also

BBjAPI

BBjWindow

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