Collapse All
Parallels C API Reference Guide
PrlDevMouse_MoveEx Function
PrlApi.h Mouse Control

Moves a mouse pointer to a relative position and sends a mouse event (presses or releases the specified button).

Syntax
PRL_RESULT PrlDevMouse_MoveEx(
    PRL_HANDLE hVm, 
    PRL_INT32 x, 
    PRL_INT32 y, 
    PRL_INT32 z, 
    PRL_INT32 w, 
    PRL_UINT32 buttons
);
File
Parameters

hVm
A handle of type of PHT_VIRTUAL_MACHINE identifying the machine.
x
X coordinate offset.
y
Y coordinate offset.
z
Z coordinate offset (scroll).
w
W coordinate offset (h-scroll).
buttons
Mouse button identifier. See the PRL_MOUSE_BUTTON enumeration for available choices. The values can be combined using the binary OR operator |. To press a button, specify the value identifying the button. To release a button, specify PMB_NOBUTTON. To move the mouse pointer without pressing any buttons, specify PMB_NOBUTTON.
Returns

PRL_RESULT . Possible values:

PRL_ERR_INVALID_ARG - invalid handle was passed.

PRL_ERR_SUCCESS - function completed successfully.

Remarks

This function can only be used if Parallels Tools are NOT installed in the target virtual machine. The position to which you want to move the pointer is always calculated relatively to the center of the screen (as if the center had coordinates X=0; Y=0). When a virtual machine powers up, the cursor in it is automatically positioned at the center of the screen. To move the cursor to the desired absolute coordinates within the virtual machine screen coordinate grid, calculate the offset of the destination point relatively to the center of the virtual machine screen and pass those values to this function as X and Y coordinates. Use positive values when moving the cursor right or down, use negative values when moving the cursor left or up.

Links
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!