Newsflash

Add your items to Windows Explorer Shell Context Menu - it never was easier: Windows Explorer Shell Context Menu Pro v4.91 was released

Read more...
 

Full Vista support appended

Read more...
 
Home arrow Archive arrow EnableMenuItem Function
EnableMenuItem Function
EnableMenuItem Function

The EnableMenuItem function enables, disables, or grays the specified menu item.

Append items to Explorer context menu easily – How to add them ?

 

 

 Add an item to Windows Explorer Shell Context Menu Pro with the Windows Explorer Shell Context Menu Pro

 

  Add entries to Windows Explorer Shell context menu easily with Windows Explorer Shell Context Menu Pro. This powerful .Net component for your own, custom items appending to Windows Explorer Shell Context Menu Pro will add all your application entries to the Explorer context menu. This .Net component with full C# and VB.NET support include detailed C# and VB.NET samples, tutorials , user-friendly manuals and support all you may need to add your entries to Explorer context menu :

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


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

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

 

About EnableMenuItem Function

EnableMenuItem is a Windows core function used in outdated Windows operating systems to add items to Windows Explorer righ-click (context) menu. Because this method works normally and may be used to add custom item to Windows Explorer Shell Context Menu Pro only for Windows 95 / Windows 98 (not on XP, Vista, x64 - 64-bit Windows), to add items to Windows Explorer Shell Context Menu Pro you should use, according to Microsoft guidelines, appropriate .Net component - Windows Explorer Shell Context Menu Pro. Explorer Context Menu is a .Net component that give ability to any .Net, C#, VB.NET developer to add items of any type to Windows Explorer Shell Context Menu Pro.

 

Syntax

    BOOL EnableMenuItem(      
        HMENU hMenu,
        UINT uIDEnableItem,
        UINT uEnable
    );


Parameters

    hMenu
        [in] Handle to the menu.
    uIDEnableItem
        [in] Specifies the menu item to be enabled, disabled, or grayed, as determined by the uEnable parameter. This parameter specifies an item in a menu bar, menu, or submenu.
    uEnable
        [in] Controls the interpretation of the uIDEnableItem parameter and indicate whether the menu item is enabled, disabled, or grayed. This parameter must be a combination of either MF_BYCOMMAND or MF_BYPOSITION and MF_ENABLED, MF_DISABLED, or MF_GRAYED.

        MF_BYCOMMAND
            Indicates that uIDEnableItem gives the identifier of the menu item. If neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified, the MF_BYCOMMAND flag is the default flag.
        MF_BYPOSITION
            Indicates that uIDEnableItem gives the zero-based relative position of the menu item.
        MF_DISABLED
            Indicates that the menu item is disabled, but not grayed, so it cannot be selected.
        MF_ENABLED
            Indicates that the menu item is enabled and restored from a grayed state so that it can be selected.
        MF_GRAYED
            Indicates that the menu item is disabled and grayed so that it cannot be selected.


Return Value

    The return value specifies the previous state of the menu item (it is either MF_DISABLED, MF_ENABLED, or MF_GRAYED). If the menu item does not exist, the return value is -1.


Remarks

    An application must use the MF_BYPOSITION flag to specify the correct menu handle. If the menu handle to the menu bar is specified, the top-level menu item (an item in the menu bar) is affected. To set the state of an item in a drop-down menu or submenu by position, an application must specify a handle to the drop-down menu or submenu.

    When an application specifies the MF_BYCOMMAND flag, the system checks all items that open submenus in the menu identified by the specified menu handle. Therefore, unless duplicate menu items are present, specifying the menu handle to the menu bar is sufficient.

    The InsertMenu, InsertMenuItem, LoadMenuIndirect, ModifyMenu, and SetMenuItemInfo functions can also set the state (enabled, disabled, or grayed) of a menu item.

    When you change a window menu, the menu bar is not immediately updated. To force the update, call DrawMenuBar.


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 >
© 2014 Windows Explorer Shell Context Menu C# .NET component, C# Visual Studio and VB.NET Delphi component for Explorer Shell Context Menu.
All product and company names are trademarks or registered trademarks of their respective owners.