My ultimate purpose is getting mouse move event from outside of my main window, and distinguish it was from mouse or stylus.
Before I ask my question, I want to notice what I already knew.
I used SetWindowsHookEx to hook mouse events. The value - MSLLHOOKSTRUCT.dwExtraInfo I received, when I use stylus pen, it came as 0xFF515712. So I was able to distinguish mouse move and stylus move. At this time, there was nothing wrong.
The problem is that mouse event messages doesn't be raised when my stylus is on any other active window(ex. Chrome). There wasn't any message so nothing to confirm and analyze. But the stylus pointer(cursor) was on my desktop wallpaper, or on the main app, everything went well as I mentioned.
In my guessing, Windows 10 treat stylus movements on web browsing as another events not as mouse events. I want to hook them, but I don't know what kind of event they are.
The important thing you need to know is that this issue is not for every mouse event, but just for events from stylus device.
I really tried to search the solution, but there is no way but ask to you genius people. Please help me, you people already helped me a lot in many stack overflow pages, but I need you more, and your answering may help this project -> https://github.com/ladofa/thepen
Additional info.
I found specific programs that absorb mouse events from stylus.
- All browsers (Chrome, Edge, Internet Explorer) except the title bar of them.
- Calculator
- VSCode