OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Constructing Menu Descriptor Objects

You can specify the grouping of your menu resources in the TMenuDescr constructor.

There are a number of different constructors for TMenuDescr, all of which are described in the following table.

ConstructorDescription
TMenuDescr::TMenuDescr(TResId id, TModule* module = ::Module) Creates a menu descriptor from the menu resource identified by id. The grouping of the pop-up menus are determined by the occurrence of separators at the menu level (that is, separators inside of a pop-up menu are disregarded for grouping purposes) in the menu resource. Menu separators are discussed in more detail in Creating Menu Groups In Menu Resources.
TMenuDescr::TMenuDescr(TResId id, int fg, int eg, int cg, int og, int wg, int hg, TModule* module = ::Module) Creates a menu descriptor from the menu resource identified by id or hMenu. The separate pop-ups in the resource are then placed in groups according to the values of fg, eg, cg, og, wg, and hg, which correspond to the groups defined in the TGroup enum. The total of all the values of these group parameters is equivalent to the number of pop-ups in the menu resource.
TMenuDescr::TMenuDescr(HMENU hMenu, int fg, int eg, int cg, int og, int wg, int hg, TModule* module = ::Module) Constructs a menu descriptor from the menu handle indicated in the hmenu parameter. The menu descriptor can have zero or more pop-up menus in more than one functional group. The fb, eg, cg, of, wg, and hg parameters represent the functional groups indentified by the Tgroup enum. Calls the function Extract Groups to extract the group counts based on the separator items in the menu bar, or uses the group count parameters specified if there are no separators in the menu bar.
TMenuDescr::TMenuDescr()Creates a default menu constructor without menu resources or group counts.
TMenuDescr::TMenuDescr(const TMenuDescr& original)Creates a copy of the menu descriptor object original.

See Also