Globally detect windows context menu popup [modified]
-
Anyone have any ideas how I could go about detecting any windows context menu while it's popping up? Is there any message I can register for, that you may have heard about? Just to be certain, I'm not trying to hook all context menus in my application, I'm trying to hook all menus globally.
www.wickedorange.com www.andrewvos.com
modified on Friday, March 7, 2008 5:23 AM
-
Anyone have any ideas how I could go about detecting any windows context menu while it's popping up? Is there any message I can register for, that you may have heard about? Just to be certain, I'm not trying to hook all context menus in my application, I'm trying to hook all menus globally.
www.wickedorange.com www.andrewvos.com
modified on Friday, March 7, 2008 5:23 AM
I don't know whether it can be done or not but if it can I guess you will need global hooks.
#region signature my articles #endregion
-
I don't know whether it can be done or not but if it can I guess you will need global hooks.
#region signature my articles #endregion
Okay, SetWinEventHook does what I need. Now I just need to get a handle to the context menu. FindWindow("#32768", NULL) seems to get the temporary pointer assigned to the menu, not the actual HMENU. Any ideas now? :)