+ // FIXME: this doesn't work for multiple windows
+ wxWindow *win = wxTheApp->GetTopWindow();
+ if ( win )
+ {
+ // VZ: we could find the menu from its handle here by examining all
+ // the menus in the menu bar recursively but knowing that neither
+ // wxMSW nor wxGTK do it why bother...
+#if 0
+ MenuRef menuRef;
+
+ GetEventParameter(event,
+ kEventParamDirectObject,
+ typeMenuRef, NULL,
+ sizeof(menuRef), NULL,
+ &menuRef);
+#endif // 0
+
+ wxMenuEvent event(GetEventKind(event) == kEventMenuOpening
+ ? wxEVT_MENU_OPEN
+ : wxEVT_MENU_CLOSE);
+ event.SetEventObject(win);
+
+ (void)win->GetEventHandler()->ProcessEvent(event);
+ }
+
+ return eventNotHandledErr;