共用方式為


CMFCPopupMenu::GetMenuItem

Returns a pointer to the menu item at the specified index.

CMFCToolBarMenuButton* GetMenuItem(
   int iIndex 
) const;

Parameters

  • [in] iIndex
    The zero-based index of a menu item.

Return Value

A pointer to a menu item. NULL if the index is invalid.

Remarks

Menu items are represented by the CMFCToolBarMenuButton Class. When you call this method, it returns a pointer to the appropriate CMFCToolBarMenuButton.

Requirements

Header: afxpopupmenu.h

See Also

Reference

CMFCPopupMenu Class

Hierarchy Chart

CMFCToolBarMenuButton Class