Upravit

Sdílet prostřednictvím


DFM_INVOKECOMMAND message

Sent by the default context menu implementation to request the callback function that handles the menu (LPFNDFMCALLBACK) to invoke a menu command.

DFM_INVOKECOMMAND
    wParam = (WPARAM)(int) id;          
    lParam = (LPARAM)(LPWSTR) args;
            

Parameters

id [in]

The command ID of the selected menu command. The following flags are recognized:

DFM_CMD_DELETE

Windows Vista and later. Delete the current item.

DFM_CMD_MOVE

Windows Vista and later. Move the current item.

DFM_CMD_COPY

Windows Vista and later. Copy the current item.

DFM_CMD_LINK

Windows Vista and later. Create a link to the current item.

DFM_CMD_PROPERTIES

Show the Properties UI for the item on which the menu was invoked.

DFM_CMD_NEWFOLDER

Not supported.

DFM_CMD_PASTE

Windows Vista and later. Paste an item to the current location.

DFM_CMD_VIEWLIST

Not supported.

DFM_CMD_VIEWDETAILS

Not supported.

DFM_CMD_PASTELINK

Windows Vista and later. Paste a link at the current location.

DFM_CMD_PASTESPECIAL

Not supported.

DFM_CMD_MODALPROP

Not supported.

DFM_CMD_RENAME

Windows Vista and later. Rename the current item.

args [in]

A pointer to a null-terminated string that contains additional arguments to the selected menu command. This parameter can be NULL.

Return value

The handler for this message needs to return S_FALSE if you want the default implementation to invoke the default handler for the command. Return S_OK if the message was handled. Otherwise, return a standard HRESULT error code.

Remarks

This message is sent to either the callback function or the callback object depending on how the callback is implemented. There are two APIs for callback construction, CDefFolderMenu_Create2 that takes a pointer to a callback function, or SHCreateDefaultContextMenu that uses a callback object that supports IContextMenuCB.

The items on which the command is being invoked are provided in a data object passed to the callback function or to the IContextMenuCB::CallBack method. This data object is provided by the data source that implements the callback. To extract the items from the data object, use SHCreateShellItemArrayFromDataObject.

DFM_INVOKECOMMANDEX is an extended version of this message and provides more information to the callback. Use DFM_INVOKECOMMANDEX if the additional information provided by that interface is needed in your implementation.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Shlobj.h