_Carlos_ Posted January 28, 2009 Report Share Posted January 28, 2009 Hello again,I'm programming a dll that captures the mouse click with hooks.I want to capture the left, right and middle click mouse. I have tried with WH_MOUSE, WH_MOUSE_LL hooks.... but my program captures the movements of the mouse, not the click mouse.I do the following:hkb = SetWindowsHookEx(WH_MOUSE, HookMouseProc, (HINSTANCE)g_hModule, 0);And to capture the mouse clicks:if((wParam != NULL) && (lParam != NULL)) { if ((wParam == WM_LBUTTONDOWN) || (wParam == WM_MBUTTONDOWN) || (wParam == WM_RBUTTONDOWN)){ ................................... }I think that I don´t capture the correct signal in if.... But I don´t know wich signals are the correct ones Thanks in advanced Quote Link to comment Share on other sites More sharing options...
La loooca de la praaderaaa Posted January 28, 2009 Report Share Posted January 28, 2009 Hi Carlos!You are right. These are not the correct messages.Here you have the good ones:if((wParam != NULL) && (lParam != NULL)) { if ((wParam == MK_LBUTTON) || (wParam == MK_MBUTTON) || (wParam == MK_MBUTTON){ ................................... }Good Luck ;)Hello again,I'm programming a dll that captures the mouse click with hooks.I want to capture the left, right and middle click mouse. I have tried with WH_MOUSE, WH_MOUSE_LL hooks.... but my program captures the movements of the mouse, not the click mouse.I do the following:hkb = SetWindowsHookEx(WH_MOUSE, HookMouseProc, (HINSTANCE)g_hModule, 0);And to capture the mouse clicks:if((wParam != NULL) && (lParam != NULL)) { if ((wParam == WM_LBUTTONDOWN) || (wParam == WM_MBUTTONDOWN) || (wParam == WM_RBUTTONDOWN)){ ................................... }I think that I don´t capture the correct signal in if.... But I don´t know wich signals are the correct ones Thanks in advanced Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.