IContextMenu::GetCommandStringIContextMenu::GetCommandString*
*Contents  *Index  *Topic Contents
*Previous Topic: IContextMenu
*Next Topic: IContextMenu::InvokeCommand

IContextMenu::GetCommandString


HRESULT GetCommandString(
    UINT idCmd,
    UINT uFlags,
    UINT *pwReserved,
    LPSTR pszName,
    UINT cchMax
   );

Retrieves the language-independent command string or the Help text for a context menu item.

idCmd
Menu item identifier offset.
uFlags
Flags specifying the information to retrieve. This can be one of the following values:
GCS_HELPTEXT Returns the Help text for the menu item.
GCS_VALIDATE Validates that the menu item exists.
GCS_VERB Returns the language-independent command name for the menu item.
pwReserved
Reserved. Applications must specify NULL when calling this method, and handlers must ignore this parameter when called.
pszName
Address of the buffer to receive the null-terminated string being retrieved.
cchMax
Size of the buffer to receive the null-terminated string.

The language-independent command name can be passed to the IContextMenu::InvokeCommand method to activate a command by an application. The Help text is a description that Windows Explorer displays in its status bar; it should be reasonably short (under 40 characters).

See also IContextMenu


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