[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] XaAES: menus in windows - window handle?



9 aug 2010 kl. 00.23 skrev Henk Robbers:

> Peter, you must be a very nice and cooperative guy.
> I sincerely hope you will never get regrets about such a hack.

I beg your pardon???

MN_SELECTED returns the address of the object tree associated with the menu event. It's been that way since 1985, and right now that's the only way to uniquely identify an event as belonging to a particular menu. There is no other way to do that. All I do is to tag each window with the address of its menu bar, and evaluate this information each time I receive a MN_SELECTED event.

In my case, I needed to clone the menu resource anyway, since the contents of the menu depends on the contents of the window.

If you know of a less ugly solution, please feel free to spill the beans.

-- PeP