sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.7k stars 638 forks source link

DeviceFlags.ExclusiveInputSink does not seem to work in RawInput #906

Closed evilC closed 7 years ago

evilC commented 7 years ago

If I take the SharpDX RawInput sample, and change the line
Device.RegisterDevice(UsagePage.Generic, UsageId.GenericMouse, DeviceFlags.None);
to
Device.RegisterDevice(UsagePage.Generic, UsageId.GenericMouse, DeviceFlags.ExclusiveInputSink);
then mouse input breaks for the demo.
Am I doing something wrong?
I want to be able to do the same as in the demo, but not require the user to click the GUI to begin capture.

evilC commented 7 years ago

Duh, I need to pass the hwnd of the form. Never mind.