# ActiveX Controls Registry Information

For 32-bit controls, there are a number of registry entries and flags that are used. Additionally, controls can support component categories to classify the features they provide.

Registry keys related to controls are italicized in the following list:

    HKEY_CLASSES_ROOT
        CLSID
          {class id of control}
              ProgID = identifier
              InprocServer32 = <filename>.DLL
              DefaultIcon = <filename>.<ext>,resourceID
              ToolboxBitmap32 = <filename>.<ext>,resourceID
              Control
              verb
                  n = &Properties...
              MiscStatus = 0
              TypeLib = {typelib ID for the object}
              Version = version number

The DefaultIcon entry is used to identify an icon to be displayed when the control is minimized to an icon. The Windows API function ExtractIcon is used to get the icon from the .DLL or .EXE file specified.

The ToolboxBitmap32 entry identifies the module name and resource identifier for a 16*15 bitmap to use for the face of a toolbar or toolbox button. The standard Windows icon size is too large to be used for this purpose. This entry specifically supports control containers that have a design mode in which one selects controls and places them on a form being designed. For example, in Visual Basic, the control’s icon is displayed in the Visual Basic toolbox during design mode.

The Control entry marks an object as a control. This entry is often used by containers to fill in dialog boxes. The container uses this sub-key to determine whether to include an object in a dialog box that displays controls.

The Insertable sub-key can also be used with controls, depending on whether the object can act only as an in-place embedded object with no special control features. Objects marked with Insertable appear in the Insert Object dialog box of their container. The Insertable entry generally means that the control has been tested with non-control containers.

Both the Insertable and the Control sub-keys are optional. A control can omit the Insertable sub-key if it not designed to work with older containers that do not understand controls. A control can omit the Control key if it is only designed to work with a specific container and thus does not wish to be inserted in other containers.

Controls should have a Properties verb, OLEIVERB_PROPERTIES, along with any other verbs they support. The Properties verb, as well as the standard verb OLEIVERB_PRIMARY, instructs the control to display its property sheet. The Properties verb is displayed as the Properties item on the container’s menu when the control is active. This way, the control can display its own property page allowing some useful functionality to the end user, even if the container does not handle controls.

A control defines the MiscStatus key to describe itself to potential containers. The bits take on the values from OLEMISC, and controls add several values to this enumeration. See the OLEMISC enumeration values for more information. The client can obtain this information by calling IOleObject::GetMiscStatus without having to instantiate the control first.

Finally, Version describes the version of the control which should match the version of the type library associated with this control.

Also in the type information for a control, the attribute control marks a coclass entry as describing a control.