Need help....Mouse Hook
-
I need to disable the original mouse behavior and let it to do some action that I want it to do. For example, when user clicks right mouse button, I want it to simulate a 'Enter' key but not to show a popup menu. I use SetWindowsHookEx(WH_GETMESSAGE,....) function to get the mouse click message like WM_RBUTTONDOWN, WM_MBUTTONUP...etc. and then return false to prevent the message into the hook chain again. It really works well. But under Miscrosoft Office(Word, Excel..), it always run 6 times. For example, if I simulate the right mouse button to 'Backspace' key, everytime I click right mouse button, it runs 6 times. I think it's not good, it should only run once, right??? Could anyone help me to solve this bug??? Thanks a lot. :confused:
-
I need to disable the original mouse behavior and let it to do some action that I want it to do. For example, when user clicks right mouse button, I want it to simulate a 'Enter' key but not to show a popup menu. I use SetWindowsHookEx(WH_GETMESSAGE,....) function to get the mouse click message like WM_RBUTTONDOWN, WM_MBUTTONUP...etc. and then return false to prevent the message into the hook chain again. It really works well. But under Miscrosoft Office(Word, Excel..), it always run 6 times. For example, if I simulate the right mouse button to 'Backspace' key, everytime I click right mouse button, it runs 6 times. I think it's not good, it should only run once, right??? Could anyone help me to solve this bug??? Thanks a lot. :confused:
If you post this in the Visual C++ Forum you'll probably get a decent answer :-)
"When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]