InjectedInputMouseInfo.DeltaX Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the change in value of an x-coordinate since the last mouse wheel event.
public:
property int DeltaX { int get(); void set(int value); };
int DeltaX();
void DeltaX(int value);
public int DeltaX { get; set; }
var int32 = injectedInputMouseInfo.deltaX;
injectedInputMouseInfo.deltaX = int32;
Public Property DeltaX As Integer
Property Value
int
The number of notches or distance thresholds crossed since the last pointer event. The default value is 0.
Examples
Here are some downloadable samples demonstrating basic input and input injection:
Remarks
Important
The APIs in this namespace require the inputInjectionBrokered restricted capability.
Using input injection requires the following be added to the Package.appxmanifest:
- To
<Package>
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="rescap"
- To
<Capabilities>
<rescap:Capability Name="inputInjectionBrokered" />
The x-coordinate value being changed is dependent on the flags set with MouseOptions. Some examples include:
- HWheel: the distance that a mouse wheel has rotated around the x-axis (horizontal). The mouse wheel button has discrete, evenly spaced notches or distance thresholds (also called detents). When you rotate or tilt the wheel, a wheel message is sent as each detent is encountered.
The windows constant, WHEEL_DELTA (defined as a value of 120), describes one detent. Each detent marks the threshold for a single increment of an associated action (for example, scrolling a line or page).
Note
The delta was set to 120 to enable finer-resolution wheels (such as freely-rotating wheels with no notches) that send more messages per rotation, but with smaller values per message.
A positive value indicates that the wheel was rotated forward (away from the user) or tilted to the right; a negative value indicates that the wheel was rotated backward (toward the user) or tilted to the left.
- XDown or XUp: 1 for XBUTTON1 or 2 for XBUTTON2XBUTTON1 and XBUTTON2 are additional buttons used on many mouse devices, often for forward and backward navigation in Web browsers. They return the same data as standard mouse buttons.