IContextMenu2::GetCommandStringIContextMenu2::GetCommandString*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IContextMenu2
*Next Topic: IContextMenu2::HandleMenuMsg

IContextMenu2::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
Flag specifying the information to retrieve. This parameter 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 handles 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 is a name that 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 IContextMenu2, IContextMenu


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