IContextMenuSite interface

[The only method, DoContextMenuPopup, is no longer available for use as of Windows Server 2003.]

Implemented by the default folder view created using SHCreateShellFolderView. An implementation of IContextMenuSite supports IContextMenu::QueryContextMenu, IContextMenu::InvokeCommand, and TrackPopupMenu and any message forwarding necessary for that function. IContextMenuSite typically updates the status bar as well.

Methods

The IContextMenuSite interface has these methods.

Method Description
IContextMenuSite::DoContextMenuPopup DoContextMenuPopup is no longer available for use as of Windows Server 2003.

Remarks

The IID for this interface is IID_IContextMenuSite.

To acquire a context menu site pointer code that exists in the site chain of the folder view, use QueryService using SID_SFolderView to get to the folder view.

CComPtr<IContextMenuSite> spcms;
hr = IUnknown_QueryService(_punkSite, SID_SFolderView, IID_PPV_ARGS(&spcms));

if (SUCCEEDED(hr))
{
    ...
}

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)