windows 8.1 - Two Mice, capturing exclusively one mouse using Raw Input Model (C++/Visual Studio 2013/Win 8.1) -


how configure read specific mouse when 2 mice connected? trying use 1 of them sensor , other regular mouse. right reads both mice (not simultaneously,though). using wm_input model register , read. did search answers here, 1 of post used directinput method same problem. appreciate if can post link if it's been answered. thanks.

void onrawinput(bool inforeground, hrawinput hrawinput){ uint datasize; getrawinputdata(hrawinput, rid_input, null, &datasize, sizeof(rawinputheader));  if (datasize == 0)     return; if (datasize > m_rawinputmessagedata.size())     m_rawinputmessagedata.resize(datasize);  void* databuf = &m_rawinputmessagedata[0]; getrawinputdata(hrawinput, rid_input, databuf, &datasize, sizeof(rawinputheader));  const rawinput *raw = (const rawinput*)databuf; if (raw->header.dwtype == rim_typemouse){     handle devicehandle = raw->header.hdevice;     const rawmouse& mousedata = raw->data.mouse;     ushort flags = mousedata.usbuttonflags;     short wheeldelta = (short)mousedata.usbuttondata;     long x = mousedata.llastx, y = mousedata.llasty;      wprintf(l"mouse: device=0x%08x, flags=%04x, wheeldelta=%d, x=%d, y=%d\n",     devicehandle, flags, wheeldelta, x, y); } 


Comments