CMenu::GetMenuItemInfo

BOOL CMenu::GetMenuItemInfo( UINT nIDItem, LPMENUITEMINFO lpMenuItemInfo, BOOL ByPos = FALSE );

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, use the Win32 function GetLastError, as described in the Platform SDK.

Parameters

nIDItem

Identifier or position of the menu item to get information about. The meaning of this parameter depends on the value of ByPos.

lpMenuItemInfo

A pointer to a MENUITEMINFO, as described in the Platform SDK, that contains information about the menu.

ByPos

Value specifying the meaning of nIDItem. By default, ByPos is FALSE, which indicates that uItem is a menu item identifier. If ByPos is not set to FALSE, it indicates a menu item position.

Remarks

This member function implements the behavior of the of the Win32 function GetMenuItemInfo, as described in the Platform SDK.

Note that in the MFC implementation of GetMenuItemInfo, you do not use a handle to a menu.

CMenu OverviewClass MembersHierarchy Chart

See Also   CWnd::GetMenu, CMenu::GetMenuItemCount, CMenu::GetMenuItemID