OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The TMenuDescr class provides two ways to set up the groups that your various pop-up menus belong in:
Earlier versions of ObjectWindows provided only the first method. The second method is new in ObjectWindows 2.5 . This method is more flexible, eliminating the need to modify the TMenuDescr constructor whenever you add or remove a pop-up menu in your menu resource.
To set up groups in your menu resource, put separators at the pop-up menu level, outside the pop-up definitions. These separators have meaning only to the TMenuDescr constructor and do not cause any changes in the appearance of your menu bar. Separators inside pop-up menus are treated normally: They appear in the pop-up menu as separator bars between menu choices.
The following example shows how a menu resource might be divided up into groups using separators in the menu resource. The menu resource is divided up into the requisite six groups, with four of the groups containing actual pop-up menus: the File menu, the Edit menu, the Window menu, and the Help menu. The other two groups are empty.