## wxMenuEvent

This class is used for a variety of menu-related events. Note that these do not include menu command events, which are handled using wxCommandEvent objects.

The handler wxFrame::OnMenuHighlight displays help text in the first field of the status bar.

Derived from

wxEvent
wxObject

Include files

<wx/event.h>

Event table macros

To process a menu event, use these event handler macros to direct input to member functions that take a wxMenuEvent argument.

EVT_MENU_OPEN(func) | A menu is about to be opened. On Windows, this is only sent once for each navigation of the menubar (up until all menus have closed).
EVT_MENU_CLOSE(func) | A menu has been just closed.
EVT_MENU_HIGHLIGHT(id, func) | The menu item with the specified id has been highlighted: used to show help prompts in the status bar by wxFrame
EVT_MENU_HIGHLIGHT_ALL(func) | A menu item has been highlighted, i.e. the currently selected menu item has changed.

See also

Command events,
Event handling overview

Members

wxMenuEvent::wxMenuEvent
wxMenuEvent::m_menuId
wxMenuEvent::GetMenuId
wxMenuEvent::IsPopup

### wxMenuEvent::wxMenuEvent

wxMenuEvent(WXTYPE id = 0, int id = 0, wxDC* dc = NULL)

Constructor.

### wxMenuEvent::m_menuId

int m_menuId

The relevant menu identifier.

### wxMenuEvent::GetMenuId

int GetMenuId() const

Returns the menu identifier associated with the event. This method should be only used with the `HIGHLIGHT` events.

### wxMenuEvent::IsPopup

bool IsPopup() const

Returns `TRUE` if the menu which is being opened or closed is a popup menu, `FALSE` if it is a normal one.

This method should be only used with the `OPEN` and `CLOSE` events.