Поделиться через


CMenu::GetSubMenu

Retrieves the CMenu object of a pop-up menu.

CMenu* GetSubMenu(
   int nPos 
) const;

Параметры

  • nPos
    Specifies the position of the pop-up menu contained in the menu. Position values start at 0 for the first menu item. The pop-up menu's identifier cannot be used in this function.

Возвращаемое значение

A pointer to a CMenu object whose m_hMenu member contains a handle to the pop-up menu if a pop-up menu exists at the given position; otherwise NULL. If a CMenu object does not exist, then a temporary one is created. The CMenu pointer returned should not be stored.

Пример

See the example for CMenu::TrackPopupMenu.

Требования

Header: afxwin.h

См. также

Основные понятия

CMenu Class

CMenu Members

Hierarchy Chart

CWnd::GetMenu

CMenu::GetMenuItemID

GetSubMenu