SetMenuItemInfo (Windows CE 5.0)

Send Feedback

This function changes information about a menu item.

BOOLSetMenuItemInfo(HMENUhMenu, UINTuItem, BOOLfByPosition,LPCMENUITEMINFOlpmii);


  • hMenu
    [in] Handle to the menu that contains the menu item.
  • uItem
    [in] The menu item identifier or the menu item position.
  • fByPosition
    [in] Boolean value of TRUE if uItem is set to a menu item position. This parameter is set to FALSE if uItem is set to a menu item identifier.
  • lpmii
    [in] Long pointer to a MENUITEMINFO structure that contains information about the menu item and specifies which menu item attributes to change.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.


Use SetMenuItemInfo to set the menu item content, an application-defined identifier, and application-defined data. SetMenuItemInfo can also set the menu item type, but it cannot change the type.

SetMenuItemInfo cannot set the menu item state, submenu, and check mark bitmaps.

In order for keyboard accelerators to work with bitmap or owner-drawn menu items, the owner of the menu must process the WM_MENUCHAR message


OS Versions: Windows CE 1.0 and later.
Header: Winuser.h.
Link Library: Menu.lib.

See Also

MENUITEMINFO | Menus Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.