CMINVOKECOMMANDINFOCMINVOKECOMMANDINFO*
*Contents  *Index  *Topic Contents
*Previous Topic: CIDA
*Next Topic: CPLINFO

CMINVOKECOMMANDINFO


typedef struct _CMInvokeCommandInfo{ 
    DWORD cbSize; 
    DWORD fMask; 
    HWND hwnd; 
    LPCSTR lpVerb; 
    LPCSTR lpParameters; 
    LPCSTR lpDirectory; 
    int nShow; 
    DWORD dwHotKey; 
    HANDLE hIcon; 
} CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO; 

Contains information about a context menu command.

cbSize
Contains the size of this structure, in bytes.
fMask
Zero, or one or more of the following flags:
CMIC_MASK_HOTKEY The dwHotKey member is valid.
CMIC_MASK_ICON The hIcon member is valid.
CMIC_MASK_FLAG_NO_UI The system is prevented from displaying user interface elements (for example, error messages) while carrying out a command.
hwnd
Handle to the window that is the owner of the context menu. An extension can also use this handle as the owner of any message boxes or dialog boxes it displays.
lpVerb
A 32-bit value that contains zero in the high-order word and a menu-identifier offset of the command to carry out in the low-order word. The shell specifies this value (using the MAKEINTRESOURCE macro) when the user chooses a menu command.
If the high-order word is not zero, this member is the address of a null-terminated string specifying the language-independent name of the command to carry out. This member is typically a string when a command is being activated by an application. The system provides predefined constant values for the following command strings.
Value String
CMDSTR_NEWFOLDER "NewFolder"
CMDSTR_VIEWDETAILS "ViewDetails"
CMDSTR_VIEWLIST "ViewList"
lpParameters
Optional parameters. This member is always NULL for menu items inserted by a shell extension.
lpDirectory
Optional working directory name. This member is always NULL for menu items inserted by a shell extension.
nShow
Set of SW_ values to pass to the ShowWindow function if the command displays a window or starts an application.
dwHotKey
Optional hot key to assign to any application activated by the command. If the fMask parameter does not specify CMIC_MASK_HOTKEY, this member is ignored.
hIcon
Icon to use for any application activated by the command. If the fMask member does not specify CMIC_MASK_ICON, this member is ignored.

The address of this structure is passed to the IContextMenu::InvokeCommand method.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.