Bagikan melalui


CMFCPopupMenu::GetParentButton

Returns a pointer to the parent toolbar button.

CMFCToolBarMenuButton* GetParentButton() const;

Return Value

A pointer to the parent toolbar button. NULL if the pop-up menu has no parent toolbar button.

Remarks

A CMFCPopupMenu can be associated with a button on the menu. In this scenario, the pop-up menu appears when a user selects the parent toolbar button.

If the pop-up menu is a shortcut menu, it will have no parent toolbar button.

Requirements

Header: afxpopupmenu.h

See Also

Reference

CMFCPopupMenu Class

Hierarchy Chart

CMFCToolBarMenuButton Class