Skip to content

CreateComInstance - cCJAbstractCommandBar

Called as part of the COM object creation process. Creates the COM menubar or toolbar for this object and all child cCJMenuItem COM objects

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 commandbar control (cCJCommandBar) and binds it to this object. It remains statically bound to this object.

  2. It calls the event OnCreate.

  3. It sends CreateComInstance to all child objects. This recursively builds the menubar or toolbar content.

You will rarely augment or send this message.