Share via


GetMenuItemInfo

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function retrieves information about a menu item.

Syntax

BOOL GetMenuItemInfo(
  HMENU hMenu, 
  UINT uItem, 
  BOOL fByPosition, 
  LPMENUITEMINFO lpmii 
);

Parameters

  • 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, out] Long pointer to a MENUITEMINFO structure that specifies the information to retrieve and receives information about the menu item. Note that you must set MENUITEMINFO.cbSize to sizeof(MENUITEMINFO) before calling this function.

Return Value

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

Remarks

The system provides the check mark bitmap; therefore, the MENUITEMINFO structure does not contain information about the check mark bitmaps.

Requirements

Header winuser.h
Library Menu.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

SetMenuItemInfo
MENUITEMINFO
Menus Functions