diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index 3afe190faf..2b7ef8975a 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -1240,6 +1240,18 @@ void MyFrame::LogMenuOpenCloseOrHighlight(const wxMenuEvent& event, const wxChar { msg << wxT(" (id=") << event.GetId() << wxT(")"); } + else // wxEVT_MENU_{OPEN,CLOSE} + { + wxMenu* const menu = event.GetMenu(); + if ( menu ) + { + msg << " (menu with title \"" << menu->GetTitle() << "\")"; + } + else + { + msg << " (no menu)"; + } + } msg << wxT(".");