[This is preliminary documentation and subject to change.]
Carries information about a simulated mouse event.
typedef struct tagMOUSEINPUT {
LONG dx;
LONG dy;
DWORD mouseData;
DWORD dwFlags;
DWORD dwExtraInfo;
} MOUSEINPUT, FAR* LPMOUSEINPUT;
Depending on the flags specified in the dwFlags member of the associated SendInput function call, these members indicate either an absolute position or an amount of movement since the last mouse event occurred. If the MOUSEEVENTF_ABSOLUTE bit is set in the dwFlags member, then these are absolute positions; otherwise they are relative movement values.
If the dwFlags member does not contain MOUSEEVENTF_WHEEL, then you must set mouseData to zero.
MOUSEEVENTF_ABSOLUTE | Specifies that the dx and dy members contain normalized absolute coordinates. If the flag is not set, the dx and dy members contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or other pointing device, if any, is connected to the system. |
MOUSEEVENTF_LEFTDOWN | Specifies that the left button was pressed. |
MOUSEEVENTF_LEFTUP | Specifies that the left button was released. |
MOUSEEVENTF_MIDDLEDOWN | Specifies that the middle button was pressed. |
MOUSEEVENTF_MIDDLEUP | Specifies that the middle button was released. |
MOUSEEVENTF_MOVE | Specifies that movement occurred. |
MOUSEEVENTF_RIGHTDOWN | Specifies that the right button was pressed. |
MOUSEEVENTF_RIGHTUP | Specifies that the right button was released. |
MOUSEEVENTF_WHEEL | Windows NT only: Specifies that the wheel was moved, if the mouse has a wheel. The amount of movement is specified in mouseData. |
This structure is contained by the INPUT structure and used with the SendInput function.
Simulating Input