MDI Main Commandbar System
One of the primary uses of the cCJCommandBarSystem class is to create your main menubar, toolbar, and statusbar for your MDI application. When used in such a manner, your object structure will appear as follows:
Object oMain is a Panel
Object oCommandBarSystem is a cCJCommandBarSystem
Object oMenuBar is a cCJMenuBar
:
End_Object
Object oFindToolBar_1…n is a cCJToolbar
:
End_Object
Object oStatusBar is a cCJStatusBar
:
End_Object
End_Object
Object oClientArea is a ClientArea
// add all views here
:
End_Object
When the commandbar system is placed within the MDI Panel class and positioned next to the ClientArea class, it will recognize that this is the “main” commandbar system and work properly with the panel and the client area objects. Menubars and toolbars can be docked against the panel’s frame, and all resizing of the panel, the commandbar system, and the client area occurs automatically.
In addition, the global handle ghoCommandBars is set to this commandbar system object. This can be used by other parts of the system to identify the main commandbar system object. Context menus use this variable to find its owner commandbar system.
The function IsMDIMenu can be called to determine if a commandbar system is the main MDI commandbar system.