CommandBarSystemObject - cCJCommandBarSystem
Returns the object id of this object. This is used by child objects to find the cCJCommandbarSystem object
Type: Function
Return Data Type: Handle
Syntax
Function CommandBarSystemObject Returns Handle
Call Example
Get CommandBarSystemObject to HandleVariable
Description
CommandBarSystemObject returns the object id of this object. This is used by child objects to find the cCJCommandbarSystem object.
For example, a menu object, cCJMenuItem object that is nested somewhere within a command bar system can find the commandbar system object that owns it by sending this message. It will delegate until it finds this message.
Context menus are special. They are normally not nested within the commandbar system object so this message cannot be found via delegation. However, the message CommandbarSystemObject in the cCJContextMenu class performs the same task and properly finds the "owner" commandbar system.
You should always use this message to find the owner commandbar system object. Do not rely on delegation as this will not always work (e.g., context menus) resulting in less portable code.
Procedure OnExecute Variant vCommandBarControl
Handle hoCommandBars hoClientArea
Get CommandBarSystemObject to hoCommandBars
Get ClientAreaObject of hoCommandBars to hoClientArea
If hoClientArea Begin
Send Switch_Next_View of hoClientArea
End
End_Procedure
Return Value
Returns self