IShellBrowser::InsertMenusSB
[Now
Supported on Windows NT]
Allows the
Explorer to insert its menu groups into the composite menu being displayed
while viewing or using an extended namespace.
HRESULT InsertMenusSB(
|
HMENU hmenuShared, |
// A handle
to an empty menu |
|
LPOLEMENUGROUPWIDTHS lpMenuWidths |
// Points to
OLEMENUGROUPWIDTHS |
|
); |
|
Parameters
hmenuShared
Specifies a
handle to an empty menu.
lpMenuWidths
Points to an
OLEMENUGROUPWIDTHS array of 6 LONG values. The container fills in elements 0,2,
and 4 to reflect the number of menu elements it provided in the File, View, and
Window menu groups.
Return Values
Returns
NOERROR if successful or an OLE-defined error value otherwise.
Remarks
This method
is similar to IOleInPlaceFrame::InsertMenus. The Explorer puts File and Edit pulldown
menus in the File menu group, View and Tools in the Container menu group, and
Help in the Window menu group. Each pulldown menu will have a unique
identifier, FCIDM_MENU_FILE/EDIT/VIEW/TOOLS/HELP. The view is allowed to insert
menu items into those submenus by their identifiers, which is different from
OLE s in-place activation mechanism. The command IDs for menus that the view
inserts into either the Explorer s submenus or its own submenus, must be
between FCIDM_SHVIEWFIRST and FCIDM_SHVIEWLAST.
Notes to Callers
This method
is called by namespace extensions when they are first being activated so they
can insert their menus into the frame-level user interface.
The object
application asks the container to add its menus to the menu specified in hmenuShared
and to set the group counts in the OLEMENUGROUPWIDTHS array pointed to by lpMenuWidths.
The object application then adds its own menus and counts. Objects can call IOleInPlaceFrame::InsertMenus as many times as necessary
to build up the composite menus. The container should use the initial menu
handle associated with the composite menu for all items in the drop-down menus.
Notes to Implementors
For IShellBrowser
implementations, the menu identifiers must be in the range of
FCIDM_BROWSERFIRST to FCIDM_BROWSERLAST.
See Also