Controls -- variously called OLE Controls, ActiveX Controls, and OCXs -- are applications that combine the features of an in-process OLE compound document server and an OLE Automation server. Thus much of the process of implementing a control has been described in Chapter 4, "OLE Automation" and Chapter 6, "The OLE-Server Library".
To implement an OLE control, use the OLE-Control-Framework library. The implementation process differs from using the OLE-Server library as follows:
<OLE-control-framework>, page 337, instead of <ole-server-framework> or <ole-in-process-server>. (The class <OLE-control-framework> is a subclass of both <ole-in-process-server> and <simple-component-object>.)
initialize-ole-control, page 338.
Overall, the code for an OLE control will look something like this:
define COM-interface <my-object-class> (<ole-control-framework>) ... end; define constant my-type-info = make(<coclass-type-info>, class: <my-object-class>, ...); ... initialize-ole-control(my-type-info, "my.prog.id");