OnCreate - cCJContextMenu
Event is called when the context menu's COM object is created
Type: Event
Syntax
Procedure OnCreate
Description
The OnCreate event is called when the context menu's COM object is created. At this point this object is bound to the COM object. This event can be used to send messages to the COM object allowing for special customizations not supported directly by other design-time properties.
Unlike other menubar and toolbar objects, the context menu's COM object is created right before it is displayed and it is destroyed after it disappears. Therefore OnCreate is called every time the context menu is invoked.
The OnPopupInit event is called after OnCreate and is also called every time the menu is invoked. This behavior is consistent with OnPopupInit in other classes.
Set CreatePopupComInstance for a full description of this process.