handling menu events.

I understand that the application itself is the first to receive the menu event. (Edit Select All / Edit Copy)
I have a subclass of listbox that I need those events to go to.
I added the event handler to the subclass of listbox and that almost works…
It fails of course if some other control on the application can also handle the same event like a text field.

If the listbox doesn’t have focus because say the text field does then the user must press tab until the listbox is selected.

Have I misunderstood something?
Is It that the app sends the event to every control until one of them handles it by returning true or to whomever has input focus?

If the focused control has a handler for the menu item then that one will fire. If not it will go up to parent controls, window, app level menu handlers.

You could just set it at the window level if you want an entire window to handle a menu item the same way so that the same function will process regardless of the focused control.

Brian, you’ve got it backwards. The control gets the event first. If it doesn’t have a menu handler, then the window gets it, then the app if all else fails. Only the control that has focus will ever get the event.