Newsflash

Add your items to Windows Explorer Shell context menu - it never was easier: Windows Explorer Shell Context Menu v7.14 was released

Read more...
 

Full Vista support appended

Read more...
 
Home arrow Archive arrow IContextMenu::GetCommandString Method
IContextMenu::GetCommandString Method PDF Print E-mail
IContextMenu::GetCommandString Method

Gets information about a shortcut menu command, including the help string and the language-independent, or canonical, name for the command.

Adding items to Windows Explorer Shell context (right-click) menu easily – How it may be done ?

 

 

 Append items to Windows Explorer Shell context menu with the Windows Explorer Shell Context Menu

 

  Add an item to Windows Explorer Shell context menu easily with Windows Explorer Shell Context Menu. This powerful .Net component for your own, custom items adding to Explorer Shell context menu will add all your custom application items to the Windows Explorer Shell context menu. It , C++ and Visual Basic .NET support include detailed C# / VB.NET samples, tutorials , user-friendly manuals and support all you may need :

  • Add items to Windows Explorer Shell context menu to be shown on any Windows operating system (all OS are supported – Windows XP, Vista, x64 , etc.)
  • Add items to Windows Explorer Shell context menu to be shown in any way - with custom caption and icon, as separator or sub-menu
  • Add items to Explorer Shell context menu to be shown for all types of files or shown only for computer files of particular type (for example, only for .PDF .TXT , .MP3,.WMA,.AAC , .MPG files)
  • Add items to Windows Explorer Shell context menu, sub-menus, sub-sub-menus, sub-menus of unlimited depth and even much more


Explorer Shell Context Menu - is a powerful .Net framework component that support all you may need to insert all your program items to Windows Explorer Shell context menu - in a fast and easy way. Add all your items to Explorer context menu right now – fast , easy and exactly as you prefere :

 Add an item To the Windows Explorer Shell Context Menu in a very easy way with Windows Explorer Shell Context Menu

 

GetCommandString Function Description

GetCommandString is a function that is used for command interoperational strings gather and that participated on old Windows operating system in appending of custom items to Windows Explorer Shell context menu, because GetCommandString method works for custom items appending to Explorer context menu only for Windows 95 / Windows 98 (not on XP, Vista, x64 - 64-bit Windows), to add an item to Windows Explorer Shell context menu you should use, according to Microsoft guidelines, appropriate .Net component - Windows Explorer Shell Context Menu. This powerful component developed specially for .Net framework with its full C# and VB.NET support help developer to add items to Explorer context menu very easily and fast.

 

Syntax

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


Parameters

    idCmd
        Menu command identifier offset.
    uFlags
        Flags specifying the information to return. This parameter can have one of the following values.

        GCS_HELPTEXTA
            Sets pszName to an ANSI string containing the help text for the command.
        GCS_HELPTEXTW
            Sets pszName to a Unicode string containing the help text for the command.
        GCS_VALIDATEA
            Returns S_OK if the menu item exists, or S_FALSE otherwise.
        GCS_VALIDATEW
            Returns S_OK if the menu item exists, or S_FALSE otherwise.
        GCS_VERBA
            Sets pszName to an ANSI string containing the language-independent command name for the menu item.
        GCS_VERBW
            Sets pszName to a Unicode string containing 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
        The address of the buffer to receive the null-terminated string being retrieved.
    cchMax
        Size of the buffer, in characters, to receive the null-terminated string.


Return Value

    Returns S_OK if successful, or an error value otherwise.


Remarks

    The language-independent command name, or verb, 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 of the command that Microsoft Windows Explorer displays in its status bar. It should be reasonably short (under 40 characters).

    Several common verbs can be identified by their canonical name, for instance, open, print, delete, and rename. Clients can compare the string pointed to by pszName against these canonical names to check for their presence on the shortcut menu.

    Even though pszName is declared as an LPSTR, you must cast it to UINT_PTR and return a Unicode string if uFlags is set to either GCS_HELPTEXTW or GCS_VERBW. GCS_UNICODE can be used as a bit mask to test uFlags for 'W' versus 'A' versions of the flag it contains.

 
< Prev   Next >
© 2012 Add items to context menu, add entries, add programs and commands -
Easily with Windows Explorer Shell Context Menu .NET Component (C#, VB, C++, VB.NET).
All product and company names are trademarks or registered trademarks of their respective owners.