+ wxEventType type=0;
+ MenuCommand cmd=0;
+ switch (GetEventKind(event))
+ {
+ case kEventMenuOpening:
+ type = wxEVT_MENU_OPEN;
+ break;
+ case kEventMenuClosed:
+ type = wxEVT_MENU_CLOSE;
+ break;
+ case kEventMenuTargetItem:
+ type = wxEVT_MENU_HIGHLIGHT;
+ GetEventParameter(event, kEventParamMenuCommand,
+ typeMenuCommand, NULL,
+ sizeof(cmd), NULL, &cmd);
+ if (cmd == 0) return eventNotHandledErr;
+ break;
+ default:
+ wxFAIL_MSG(wxT("Unexpected menu event kind"));
+ break;
+ }
+
+ wxMenuEvent wxevent(type, cmd);