OLEMENUGROUPWIDTHS
The OLEMENUGROUPWIDTHS
structure is the mechanism for building a shared menu. It indicates the
number of menu items in each of the six menu groups of a menu shared between a
container and an object server during an in-place editing session.
The structure
is defined in the IOleInPlaceFrame interface (inplcf.idl). It is
used in the IOleInPlaceFrame::InsertMenus and ICDStandardForm::SetMenu
methods, and the OleCreateMenuDescriptor
typedef struct tagOleMenuGroupWidths
{
LONG width[6];
} OLEMENUGROUPWIDTHS, * LPOLEMENUGROUPWIDTHS;
Member
width
An array
whose elements contain the number of menu items in each of the six menu groups
of a shared in-place editing menu. Each menu group can have any number of menu
items. The container uses elements 0, 2, and 4 to indicate the number of menu
items in its File, View, and Window menu groups. The object server uses
elements 1, 3, and 5 to indicate the number of menu items in its Edit, Object,
and Help menu groups.
Remarks
A container
application and an object server use this structure to build a shared menu. The
object server initializes to zeros the array elements in an OLEMENUGROUPWIDTHS
structure and passes a pointer to it along with a menu handle to the
container in a call to IOleInPlaceFrame::InsertMenus. The container adds
its menu items to the menu, and fills in the structure with the number of items
in each of its groups (indexes 0, 2, and 4). The server then uses the group
width values returned by the container to insert its menu items in the appropriate
position in the menu. The server fills in the structure with the number of
items in each of its groups (indexes 1, 3, and 5), and then passes the
structure to OLE in a call to the OleCreateMenuDescriptor
See Also