Home > OS >  Questions about RegisterPointerInputTarget
Questions about RegisterPointerInputTarget

Time:09-26

I want to be a function of global intercept Windows multi-touch events,

https://stackoverflow.com/questions/14297322/how-to-detect-tapping-touch-input-globally-instead-of-mouse-clicking
This place provides three ways, the first kind of HID way is not suitable for yourself to the situation of the development and application, and the third with hooks, tried and have a question,

So think it is the second RegisterPointerInputTarget way is the most practical,
But testing down, every execution RegisterPointerInputTarget failure, always returns ERROR_ACCESS_DENIED,
UiAccess=true had been set up,

Read this post, the post said interception can succeed alone, so he took his intercept touch events code,
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4bcc48a3-7131-4d2a-b46f-ea8992d00ea8/injecttouchinput-and-registerpointerinputtarget-not-work-successfully-on-windows-10-anniversary? Forum=windowscompatibility

This information almost turned over all didn't find the right solution, has experienced a great god, seek the solution,

Code:

WNDCLASS wc.
Wc. Style=0;
Wc. LpfnWndProc=TouchThread_WndProc;
Wc. CbClsExtra=0;
Wc. CbWndExtra=0;
The wc. The hInstance=GetModuleHandle (0);
Wc. HIcon=NULL;
Wc. HCursor=NULL;
Wc. HbrBackground=(HBRUSH) GetStockObject (WHITE_BRUSH);
Wc. LpszMenuName=NULL;
Wc. LpszClassName=L "MarsTouchInputCapture";
RegisterClass (& amp; Wc);

Touch_hwnd=CreateWindowEx (WS_EX_NOACTIVATE, L "MarsTouchInputCapture," L "Magnification", 0, 0, 0, 10000, 10000, NULL, NULL, GetModuleHandle (0), 0).

//RegisterTouchWindow (touch_hwnd TWF_WANTPALM);
If (RegisterPointerInputTarget (touch_hwnd, PT_TOUCH)==0)
{
DWORD err=GetLastError ();
Cout & lt; MessageBox (NULL, "RegisterPointerInputTarget L (PT_TOUCH) failed", L "error", MB_OK);
}

Void endGlobalTouch ()
{
UnregisterPointerInputTarget (touch_hwnd PT_TOUCH);
}

CodePudding user response:

Is windonws 10 to the operating system

CodePudding user response:

With hooks sure is feasible, can reference gestrueSign open source code

CodePudding user response:

reference lectre reply: 3/f
with hooks must be feasible and can be reference gestrueSign open source code


Have a more detailed tips? No any information about gestrueSign,
  • Related