I'd like to intercept a menu click, perform some action, then continue as
if the menu was clicked normally.

When there is an event associated with a menu item, this is easy, I can
replace the old OnClick handler with mine, then execute the saved OnClick
handler after I have done my dirty deed.

But what if the menu has no action? EG The "&File" menu on most
applications simply drops down the menu.

I'd like to intercept the action (add my own OnClick handler I guess), but
then, when I discover the old handler is unassigned, I'd like to continue
normally by showing the menu: this second time *without* intercepting
again...

... any ideas?

I'm guessing maybe PostMessage(... WM_SHOWMENU, ...) but I'm not figuring
out the argfuments from the docs to make a test.

Thanks in advance.


Reply via email to