INameSpaceTreeControlEvents::OnAfterContextMenu method

Called after a context menu is displayed.

Syntax


HRESULT OnAfterContextMenu(
  [in, optional] IShellItem   *psi,
  [in]           IContextMenu *pcmIn,
  [in]           REFIID       riid,
  [out]          void         **ppv
);

Parameters

psi [in, optional]

Type: IShellItem*

A pointer to the IShellItem from which the context menu is generated. This value can be NULL only if the NSTCS2_SHOWNULLSPACEMENU flag is set.

pcmIn [in]

Type: IContextMenu*

A pointer to the context menu.

riid [in]

Type: REFIID

Reference to the IID of the context menu.

ppv [out]

Type: void**

When this method returns, contains the address of a pointer to the interface specified in riid.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method allows client to completely replace the context menu. This method will allow the client to use the context menu returned by ppv and not necessarily the one specified in pcmIn.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

INameSpaceTreeControlEvents
NSTCSTYLE2

 

 

Show: