VC++ Global Hook DLL Oddity
I'm using Visual C++ Express
I've created a DLL for a global hook
I've tried this with both the GetMessage hook and the standard Mouse hook
In both cases I'm met with the same results. I'm simply trying to catch when someone right clicks on a forms minimize button. Naturally I'm watching for the WM_NCRBUTTONUP message to accomplish this. What happens is truly odd indeed. When the hooks are in place the hook doesn't trigger properly when I click the minimize button. If I click dead center or to the left of dead center on the minimze button with my right mouse button I get a system menu. If I click to the right of dead center over almost to the right border of the minimize button then my hook triggers properly but only far over to the right edge of the button. I've tested this with the maximize button and close button and they both function properly. Also if I use the left mouse button on my minimize button everything performs as expected. The only time this happens is in MY code and with the RIGHT MOUSE button.
Got any ideas? I can attach my projects if you need them.
I'm using Visual C++ Express
I've created a DLL for a global hook
I've tried this with both the GetMessage hook and the standard Mouse hook
In both cases I'm met with the same results. I'm simply trying to catch when someone right clicks on a forms minimize button. Naturally I'm watching for the WM_NCRBUTTONUP message to accomplish this. What happens is truly odd indeed. When the hooks are in place the hook doesn't trigger properly when I click the minimize button. If I click dead center or to the left of dead center on the minimze button with my right mouse button I get a system menu. If I click to the right of dead center over almost to the right border of the minimize button then my hook triggers properly but only far over to the right edge of the button. I've tested this with the maximize button and close button and they both function properly. Also if I use the left mouse button on my minimize button everything performs as expected. The only time this happens is in MY code and with the RIGHT MOUSE button.
Got any ideas? I can attach my projects if you need them.