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 DeleteMenu Function
DeleteMenu Function PDF Print E-mail

DeleteMenu Function

The DeleteMenu function deletes an item from the specified menu. If the menu item opens a menu or submenu, this function destroys the handle to the menu or submenu and frees the memory used by the menu or submenu.


Syntax

    BOOL DeleteMenu(      
        HMENU hMenu,
        UINT uPosition,
        UINT uFlags
    );

Adding an item to Explorer context (right-click) menu easily – How ?

 

 

 Add items to Windows Explorer Shell context menu with Windows Explorer Shell Context Menu

 

  Add items to Windows Explorer Shell context menu easily with Explorer Shell Context Menu. This powerful .Net component for custom items appending to Windows Explorer Shell context menu will add all your custom application entries to Windows Explorer Shell context menu. This .Net component with full C# , C++ and Visual Basic .NET support include detailed C# / VB.NET samples, tutorials and support all you may need to add your entries to Explorer context menu :

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


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

 Add items To Windows Explorer Shell Context Menu easily with Windows Explorer Shell Context Menu

 

DeleteMenu Function Description

DeleteMenu is a Windows low-level function used from Windows 3.1 for Workgroups to Windows 98, used to add item to Explorer context menu and to delete it. DeleteMenu function may be used to add item and remove item from Windows Explorer Shell context menu only on Windows 95 / Windows 98 (not on XP, Vista, x64 - 64-bit Windows), to add items to Windows Explorer Shell context menu you should use, according to Microsoft guidelines, appropriate .Net component - Windows Explorer Shell Context Menu.  With such powerful component for custom entries appending to Windows Explorer Shell context menu all your custom items will be appended to Explorer context menu, even if your items are of custom types such as separator or submenu with transparent menu icons.

 

Parameters

    hMenu
        [in] Handle to the menu to be changed.
    uPosition
        [in] Specifies the menu item to be deleted, as determined by the uFlags parameter.
    uFlags
        [in] Specifies how the uPosition parameter is interpreted. This parameter must be one of the following values.

        MF_BYCOMMAND
            Indicates that uPosition gives the identifier of the menu item. The MF_BYCOMMAND flag is the default flag if neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified.
        MF_BYPOSITION
            Indicates that uPosition gives the zero-based relative position of the menu item.


Return Value


    If the function succeeds, the return value is nonzero.

    If the function fails, the return value is zero. To get extended error information, call GetLastError.


Remarks


    The application must call the DrawMenuBar function whenever a menu changes, whether or not the menu is in a displayed window.


Example

    For an example, see Example of a Clipboard Viewer.


Function Information

    Minimum DLL Version    user32.dll
    Header    Declared in Winuser.h, include Windows.h
    Import library    User32.lib
    Minimum operating systems    Windows 95, Windows NT 3.1
    Unicode    Implemented as Unicode version.

 
< 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.