Help with menu in Windows

I have an application which main window has a MenuBar.
This MenuBar has many MenuItems. Each one has many subMenuItems as well, except one (let’s call it SpecialMenuItem) that has no subMenuItems.
Each subMenuItem has its own menuHandler method where I can write the code that is executed when I click this subMenuItem.
I can do the same with the SpecialMenuItem, but not with the other MenuItems. The application never goes to that handlers.

My question is:
Is it possible to execute code when I click a MenuItem that has subMenuItems?

Thanks for any help.

Not using Xojo ‘out of the box’
Maybe with declares or trapping windows messages

Thanks Jeff.
I feared it was this way.
In fact it is a pity because there exists a window event “EnableMenuItems” that could be very useful for this, but unfortunately it doesn’t say which MenuItem was clicked

1 Like

That hadn’t occurred to me, but you’re right… that would have been the perfect place for it.