Programmer's Reference


Using OLE custom controls (OCXs)

An OLE custom control (OCX) is an embedded OLE object that is activated in place. Unlike OLE objects, however, OCXs are manipulated programmatically by their containers through standard OLE automation protocols. OCXs are most often implemented as DLLs, which are directly loaded into the address space of their container.

An OCX:

Essentially, an OCX is an in-place-activated OLE object. On the other hand, an OCX container is a standard OLE container that supports visual editing.

An OCX container:

The steps to create an OLE container that contains OCXs are:

  1. As part of the initialization for the user-interface widget hierarchy, create an OleMainWindow.
  2. Implement methods to create OleControl widgets and the OCX objects that are to appear within their borders.
  3. Implement the ambient-property handler.
  4. Use OLE automation aspects of an OCX to set or get properties and invoke methods on the OCX.
  5. Implement the event handler callbacks.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]