|
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 API function.
typedef struct tagOleMenuGroupWidths
{
LONG width[6];
} OLEMENUGROUPWIDTHS, * LPOLEMENUGROUPWIDTHS;
Member
width
Specifies 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.
Comments
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 API function. This enables OLE to intercept the container's menu messages and
redirect the messages generated by the server's menus.
See Also
IOleInPlaceFrame::InsertMenus, OleCreateMenuDescriptor
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|