Winapi 无法接收使用Windows 8触摸注入API在应用程序级别注入的所有指针/触摸消息

Winapi 无法接收使用Windows 8触摸注入API在应用程序级别注入的所有指针/触摸消息,winapi,windows-8,multi-touch,gesture,user32,Winapi,Windows 8,Multi Touch,Gesture,User32,我能够成功注入指针/触摸消息,但无法接收应用程序上注入的所有消息(在应用程序中捕获消息),即使所有消息都成功注入且没有任何错误。请确实提供有关该问题的任何建议/解决方案 InitializeTouchInjection(10, TOUCH_FEEDBACK_INDIRECT); // // initialize the touch info structure // memset(&contact, 0, sizeof(POINTER_TOUCH_INFO)); contact.po

我能够成功注入指针/触摸消息,但无法接收应用程序上注入的所有消息(在应用程序中捕获消息),即使所有消息都成功注入且没有任何错误。请确实提供有关该问题的任何建议/解决方案

InitializeTouchInjection(10, TOUCH_FEEDBACK_INDIRECT);

//
// initialize the touch info structure
//
memset(&contact, 0, sizeof(POINTER_TOUCH_INFO));

contact.pointerInfo.pointerType = PT_TOUCH; //we're sending touch input
contact.pointerInfo.pointerId = 0;          //contact 0
contact.pointerInfo.ptPixelLocation.x = 300;
contact.pointerInfo.ptPixelLocation.y = 300;
contact.pointerInfo.pointerFlags = POINTER_FLAG_DOWN | POINTER_FLAG_INRANGE | POINTER_FLAG_INCONTACT;
contact.touchFlags = TOUCH_FLAG_NONE;
contact.touchMask = TOUCH_MASK_CONTACTAREA | TOUCH_MASK_ORIENTATION | TOUCH_MASK_PRESSURE;
contact.orientation = 90;
contact.pressure = 32000;

//
// set the contact area depending on thickness
//
// defining contact area (I have taken area of 4 x 4 pixel)

contact.rcContact.top = contact.pointerInfo.ptPixelLocation.y - 2; 

contact.rcContact.bottom = contact.pointerInfo.ptPixelLocation.y + 2; 

contact.rcContact.left = contact.pointerInfo.ptPixelLocation.x  - 2; 

contact.rcContact.right = contact.pointerInfo.ptPixelLocation.x  + 2;
//
// inject a touch down
//
bRet = InjectTouchInput(1, &contact);

//Setting the Pointer Flag to Drag

contact.pointerInfo.pointerFlags = POINTER_FLAG_UPDATE | POINTER_FLAG_INRANGE | POINTER_FLAG_INCONTACT;
bRet = InjectTouchInput(1, &contact);
for(int i=0;i<100;i++)
{

    contact.pointerInfo.ptPixelLocation.y--; 
    bRet =InjectTouchInput(1, &contact);
}
//
// if touch down was succesfull, send a touch up
//
if (bRet) {
    contact.pointerInfo.pointerFlags = POINTER_FLAG_UP;

    //
    // inject a touch up
    //
    InjectTouchInput(1, &contact);
}
初始化触摸输入(10,触摸反馈\u间接);
//
//初始化触摸信息结构
//
memset(&contact,0,sizeof(指针触摸信息));
contact.pointerInfo.pointerType=PT\u TOUCH//我们正在发送触摸输入
contact.pointerInfo.pointerId=0//联系人0
contact.pointerInfo.ptPixelLocation.x=300;
contact.pointerInfo.ptPixelLocation.y=300;
contact.pointerInfo.pointerFlags=POINTER_FLAG_DOWN | POINTER_FLAG_in range | POINTER_FLAG_in contact;
contact.touchFlags=TOUCH\u FLAG\u NONE;
contact.touchMask=触摸屏|触摸屏|接触区域|触摸屏|方向|触摸屏|压力;
接触方向=90;
接触压力=32000;
//
//根据厚度设置接触面积
//
//定义接触面积(我采用了4 x 4像素的面积)
contact.rcContact.top=contact.pointerInfo.ptPixelLocation.y-2;
contact.rcContact.bottom=contact.pointerInfo.ptPixelLocation.y+2;
contact.rcContact.left=contact.pointerInfo.ptPixelLocation.x-2;
contact.rcContact.right=contact.pointerInfo.ptPixelLocation.x+2;
//
//注入触地
//
bRet=输入(1,&触点);
//将指针标志设置为拖动
contact.pointerInfo.pointerFlags=指针_标志_更新|指针_标志_在范围内|指针_标志_在触点内;
bRet=输入(1,&触点);
对于(int i=0;i