// here I put WH_MOUSE instead of WH_MOUSE_LL
hMouseHook = SetWindowsHookEx( WH_MOUSE_LL, mouseProc, hInstance, NULL );
Fourth param must also be changed to GetCurrentThreadId() to make it local.
More Related Contents:
- Why must SetWindowsHookEx be used with a windows message queue
- How can I hook Windows functions in C/C++?
- How can I get the mouse position in a console program?
- SendInput() not equal to pressing key manually on keyboard in C++?
- Hooking DirectX EndScene from an injected DLL
- Does the stream operator exist for class member functions?
- Is segmentation fault actual undefined behavior when we refer to a non-static data-member
- C++ Matrix Class
- Is a string literal in С++ created in static memory?
- NULL vs nullptr (Why was it replaced?) [duplicate]
- Why do people use __ (double underscore) so much in C++
- Serialization with Qt
- How do I set, clear, and toggle a single bit?
- Qt 5.1.1: Application failed to start because platform plugin “windows” is missing
- Memory alignment in C-structs
- Why do I need to use typedef typename in g++ but not VS?
- Two calls to destructor
- How much footprint does C++ exception handling add
- Boost ASIO streambuf
- How typedef works for function pointers
- structured binding with [[maybe_unused]]
- Qt3d. Draw transparent QSphereMesh over triangles
- Getting big random numbers in C/C++
- Specify template parameters at runtime
- How does #include work in C++?
- Difference between const. pointer and reference?
- Iterating through a Lua table from C++?
- Avoiding extra move in make_unique/make_shared/emplace/etc for structures that use aggregate initialization
- Forcing String to int Function to Consume Entire String
- are “seekp” & “seekg” interchangeable?