I would like to detect mouse events like left button click, right button click etc in w开发者_Go百科in32. Is it possible to detect these events anywhere on the screen, not just over the window?
From my search i found setCapture() function but it requires a handle to the window, and i do not want to use a window.
Thank you.
you must try using a wide system hook to detect the mouse activity. check the WH_MOUSE_LL
and the WH_MOUSE
hooks.
Use winapi GetKeyState function https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms646301%28v=vs.85%29.aspx
Parameter: 1 - left mouse click, 2 - right mouse click, etc
精彩评论