-
March 7th, 2013, 11:56 PM
#1
Tired of googling. How to set a global hook to catch WM_MENUSELECT.
Hi,
I have a global hook system that uses a dll.
I can install hooks for everything under the sun and my hookproc will see what I expect.
I cannot for the life of me however install a hook and get WM_MENUSELECT coming through to me.
I disparately need to spy on the user and know when file, save is selected, But no joy just yet.
In the below example the first argument for SetWindowHookEx is WH_MOUSE which gives me mouse messages
If I change that to WH_Keyboard, then I get keyboard stuff.
What do I do to see WM_MENUSELECT ? Which is supposed to show the actual menu text which would be perfecto
if only it would work for me.
Hook Set:
HINSTANCE hDLL;
hDLL=LoadLibrary(reinterpret_cast<LPCSTR>("HookDll"));
CBCRMaster::hkbd=SetWindowsHookEx(WH_MOUSE,(HOOKPROC)CBCRMaster::HookProc,hDLL,0);
Thanks in advance,
:Ron
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|