Export (0) Print
Expand All

IShellBrowser::SetMenuSB method

Installs the composite menu in the view window.

Syntax


RESULT SetMenuSB(
  HMENU hmenuShared,
    HOLEMENU holemenuRes,
  HWND hwndActiveObject
);

Parameters

hmenuShared

Type: HMENU

A handle to the composite menu constructed by calls to IShellBrowser::InsertMenusSB and the InsertMenu function.

holemenuRes

Type: HOLEMENU

hwndActiveObject

Type: HWND

The view's window handle.

Return value

Type: RESULT

Returns S_OK if successful, or a COM-defined error value otherwise.

Remarks

This method is similar to the IOleInPlaceFrame::SetMenu method. However, Windows Explorer performs menu dispatch based on the menu item identifier.

The availability of specific menu items depends on whether the view has the focus. Accordingly, it is necessary to call the IShellBrowser::OnViewWindowActive method whenever the view window (or one of its child windows) has the focus.

Notes to Calling Applications

The object calls IShellBrowser_SetMenuSB to ask the container to install the composite menu structure set up by calls to IShellBrowser::InsertMenusSB.

Notes to Implementers

A container's implementation of this method should call the SetMenu function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 4.0 or later)

See also

IShellBrowser

 

 

Community Additions

ADD
Show:
© 2014 Microsoft