User's Guide
When you load the OLE Support feature, a new menu option is added to the
Parts menu of the VisualAge Organizer: the
Generate > OLE Wrapper option.
To wrapper the progress bar control, create an application such as
OcxProgressBarApp and select the Generate
> OLE Wrapper option. In the OLE Class
Generator window, do the following:
- Under OLE object information, select the Controls
radio button.
- Note:
- If you select the Other radio button instead of the
Controls radio button, you can generate an automation
object. Using an automation object, you can access the methods of a
wrapped part. You connect the automationObject attribute of
the wrapped part to the automationObject attribute of an OLE
Client. For this example, do not generate an automation object.
- From the drop-down list, select
ESPROGRESSBAR.ProgressBarCtrl.1.
-
- If you have registered the control but it is not shown in the drop-down
list, complete the following steps:
- Close the OLE Class Generator window.
- Evaluate AbtEditOleApp flushCaches. This refreshes the
VisualAge cache of control names.
- Reopen the OLE Class Generator window and continue with this
example.
- Under Code generation options, select View and type
a part name such as ProgressBarControl in the combo box.
Ensure that all generation options are selected.
- Under Code generation items, select Properties,
press mouse button 2 on the table to pop up its menu, and select Include
all. Next, select Methods and, again, pop up the
table's menu and select Include all.
- Select the Generate push button.
After VisualAge generates the wrapper, select Close. The
wrapper contains Smalltalk code that can invoke the control's properties
and methods.
Note that wrapping a control isn't necessary to use the control in an
application. You can register an OLE control and then use it for an OLE
Control part as described in Using controls in applications. However, wrapping allows several VisualAge
applications to use the control.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]