Skip to content

CreateComInstance - cCJMenuItem

Called as part of the COM object creation process. Creates the COM controls for this object (action and control) and its children

Type: Procedure

Syntax

Procedure CreateComInstance

Call Example

Send CreateComInstance

Description

This message is sent as part of the commandbar system activation sequence. The cCJCommandbarSystem object creates all child COM objects when it is activated. See CreateCommandBars for a description of this process. The cCJCommandbarSystem sends the message CreateComInstance to all child objects (menubars, toolbars, statusbars). These objects send the same message, CreateComInstance, to all of their child objects (menu items). When this message is received, it does the following:

  1. It creates the COM action by calling CreateComAction. This COM action is statically bound to this object

  2. It creates the COM control by calling CreateComControl. This COM control is not bound to this or any other object.

  3. If the object peControlType is a popup type. It sends CreateComInstance to all child objects. This recursively builds the popup menu system.

  4. If the object should be added to the designer menu (pbAddToDesignerMenu), it does so.

You will rarely augment or send this message.