Progress
External Program
Interfaces


Instantiating the Control

At runtime, your application uses AppBuilder-generated code to instantiate any ActiveX controls. This code (shown in following sections) uses the CREATE Widget statement to realize a separate control-frame widget for each ActiveX control, initializing each control-frame with the name specified at design time. It then invokes the LoadControls( ) method on each control-frame COM object to instantiate the corresponding ActiveX control, loading all design time definitions from the .wrx file.

Figure 9–3 describes the instantiation process for a single ActiveX control.

Figure 9–3: Instantiating an ActiveX Control At Runtime

Creating the control-frame widget does not, by itself, realize the control-frame. Control-frame realization occurs only after (1) it is parented to a frame widget and (2) its NAME attribute is set or its COM-HANDLE attribute is referenced. The NAME attribute is generally set first and causes realization by creating the control-frame COM object. Only then can your application use the LoadControls( ) method to (3) load the control into the control-frame COM object (the control container).

NOTE: The control-frame name must match the name specified at design time to allow LoadControls( ) to locate the specified ActiveX control in the .wrx file.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095