BBjWindow::createChildWindow

Description

In BBj 6.00 and higher, this method creates a BBjSysGui child window with a given control ID from a child window resource ID within an open resource.

Syntax

Return Value

Method

BBjChildWindow

createChildWindow(int resHandle, int childWindowID, int controlID, number x, number y)

BBjChildWindow

createChildWindow(int resHandle, int childWindowID, int controlID, number x, number y, int context)

Parameters

Variable

Description

resHandle

The handle of the open resource file returned from BBjSysGui::resOpen() or the RESOPEN() verb.

childWindowID

The ID of the CHILD-WINDOW attribute in the resource file to be created.

controlID

The control id to use on this window.

x

The x location of the child window.

y

The y location of the child window.

context

The context to use for the new child window. If this parameter is omitted, an available context will be chosen.

Return Value

Returns a BBjChildWindow object loaded from the open resource file.

Remarks

When a foreign interpreter invokes this method, an !ERROR=208 Multi Thread Error results. See Accessing Objects From Different Interpreters.

Example

let SYSGUI = UNT; OPEN (SYSGUI)"X0"
BBj! = BBJAPI()
Sysgui! = BBj!.getSysGui()

let RESOURCE$="qa11495.arc"
let RESOURCE_ID = 101

let RESOURCE = RESOPEN(RESOURCE$)
myWindow! = Sysgui!.createTopLevelWindow(RESOURCE,RESOURCE_ID)

let RESOURCE_ID = 101
let CONTROL_ID = 500
let x = 100
let y = 100
cwin! = myWindow!.createChildWindow(RESOURCE, RESOURCE_ID, CONTROL_ID, x, y)

ESCAPE

See Also

BBjAPI

BBjSysGui

BBjControl

BBjSysGui::createTopLevelWindow

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