Detect Right Click in Menus

I would like my users to be able to easily add/edit/delete buttons on toolbars similar to the way the bookmark toolbar works in FireFox.  In FireFox, you can just right click the bookmark toolbar and, among other choices, you can add a new bookmark, folder, or separator.  You can also edit the properties of a bookmark and delete the bookmark.  It does not seem to be possible to open a PopupMenu directly from a toolbar to accomplish this because the AdvMainMenu and toolbar buttons don't detect right clicks.  I have seen some code for getting menus to recognize right clicks and have added the
  procedure MenuRButtonUp(var Msg: TMessage); message WM_MENURBUTTONUP
declaration and implementation to my code but I don't see the program traverse that code.

I think it would be a useful extension of the AdvMainMenu and AdvPopupMenu for right click detection to be built in, but, if that is not practical, I  would appreciate any pointers for detecting the WM_MENURBUTTONUP message.

Thanks for your consideration.


As far as I can see this is only available in combination with TrackPopupMenuEx in combination with flag TPM_RECURSE