Object Linking and Embedding (OLE) : Using OLE custom controls (OCXs) : Using automation aspects of an OCX

Using automation aspects of an OCX
OCXs are also OLE automation objects; that is, they have properties that can be set and retrieved, and they have functions that can be invoked on behalf of their containers.
To support its OLE automation aspects, the OleControl class has the same automation protocols as the OleAutomationObject class, namely:
Since complex OCXs are often composed of many distinct objects, some of these methods may themselves return OLE automation objects.
The properties that an OCX defines are characteristic of the OCX. These characteristics can include the font used, the background color, or the caption. Since so many of these characteristics are common to so many OCXs, OLE has defined a set of standard property DISPIDs for them. A set of constants for these DISPIDs is also defined in the PlatformConstants pool dictionary. (See the Standard Property DISIDs in the table below.)
As an example of setting properties, the following code fragment initializes the track bar OCX created in the previous example:
trackBar
propertyAt: 'SliderStyle' put: 0 "Enable selection range";
propertyAt: 'SelectionStart' put: 1;
propertyAt: DispidEnabled put: true;
propertyAt: 'SelectionEnd' put: 100;
invoke: 'SetTicFrequency' withArguments: (Array with: 1 with: 5)
 
Note:
The font property DISPID DispidFont is not supported. Instead, use the fontList: instance method of OleControl to set a font into an OCX.