IContextMenuCB::CallBack method (shobjidl_core.h)
Enables the callback function for a context menu.
Syntax
HRESULT CallBack(
[in] IShellFolder *psf,
[in, optional] HWND hwndOwner,
[in] IDataObject *pdtobj,
[in] UINT uMsg,
[in] WPARAM wParam,
[in] LPARAM lParam
);
Parameters
[in] psf
Type: IShellFolder*
A pointer to the IShellFolder interface of the object that supports the IContextMenuCB::CallBack interface. The context menu interface is returned on a call to GetUIObjectOf.
[in, optional] hwndOwner
Type: HWND
A handle to the owner of the context menu. This value can be NULL.
[in] pdtobj
Type: IDataObject*
A pointer to an IDataObject that contains information about a menu selection. Implement interface IDataObject, or call SHCreateDataObject for the default implementation.
[in] uMsg
Type: UINT
A notification from the Shell's default menu implementation. For example, the default menu implementation calls DFM_MERGECONTEXTMENU to allow the implementer of IContextMenuCB::CallBack to remove, add, or disable context menu items in this callback. Use one of the following notifications.
[in] wParam
Type: WPARAM
Data specific to the notification specified in uMsg. See the individual notification page for specific requirements.
[in] lParam
Type: LPARAM
Data specific to the notification specified in uMsg. See the individual notification page for specific requirements.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |