Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to intercept user's touch action on desktop, and simulate their touch gesture to another position on screen. The target window is windows desktop or windows explorer.

current solution.
I am using RegisterPointerInputTarget API to direct all user touch information to the window which I created so that I can receive all the touch information.
Then I am using InjectTouchInput API to create touch information to expected position.

Problem:
Current solution can work in IE and chrome but does not work in windows explorer and windows desktop.
The reason is windows explorer or windows desktop does not get a message "WM_POINTERACTIVATE" before I calling InjectTouchInput, so that windows explorer or windows desktop can receive the touch message from my InjectTouchInput, but these touch messages are ignored.

The reason message "WM_POINTERACTIVATE" is so important, because this message could mark my first touch pointer(InjectTouchInput) as primary pointer. Without primary pointer, windows explorer or windows desktop will ignore all touch message.

I highly suspect that the user's original touch pointer are considered as primary pointer, so that my simulated pointer cannot get the chance to be marked as primary pointer and "WM_POINTERACTIVATE" is lost.

Question: Is there some way we can get the chance to mark our simulated pointer as primary pointer. Is there some API, which can remove the primary pointer flag from existing touch pointer. Or there some message, which I can mark my touch pointer as primary pointer.
Posted

case WM_POINTERACTIVATE:
{
InjectTouchInput();
}
 
Share this answer
 
did u find the solution?share us would be great.
 
Share this answer
 
Comments
BillWoodruff 24-Jan-15 5:29am    
Enter comments like this which are a response to the original poster on the thread by using the "Submit Comment" button on the solution, not as a "solution."
Member 9067076 25-Jan-15 19:30pm    
sorry,I will be careful next time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900