Chapter 6. Mouse and screen functions

This chapter describes function related to mouse and screen. Most of mouse operations require that you give screen coordinates so I decided to describe screen and mouse functions together.

ClientToScreen

Converts the client-area coordinates of a specified point to screen coordinates.

GetCursorPos

Retrieves the cursor's position, in screen coordinates.

GetScreenRes

Retrieves a height and width of a screen in pixels.

MouseClick

Allows one to easily interact with an application through mouse emulation.

MouseMoveAbsPix

Move the mouse cursor to given coordinates. Coordinates are are calculated against top-left corner of the screen (0,0) and are given in pixels.

MouseMoveWheel

Emulate mouse wheel movement.

NormToScreen

Converts normalized coordinates to coordinates in pixels.

ScreenToClient

Converts the screen coordinates of a specified point on the screen to client-area coordinates

ScreenToNorm

Returns normalized coordinates of given point (0-FFFF as a fraction of screen resolution)

SendLButtonDown

Simulates that the left mouse button is down in the current location of mouse pointer.

SendLButtonUp

Simulates that the left mouse button is up in the current location of mouse pointer.

SendMButtonDown

Simulates that the middle mouse button is down in the current location of mouse pointer.

SendLButtonUp

Simulates that the middle mouse button is up in the current location of mouse pointer.

SendMouse

Emulates mouse input.

SendMouseMoveRel

Moves a mouse cursor on the screen. Coordinates are relative to the last reported (current) position.

SendMouseMoveAbs

Moves a mouse cursor on the screen. Coordinates are relative to the upper left corner of the screen i.e. are absolute.

SendRButtonDown

Simulates that the right mouse button is down in the current location of mouse pointer.

SendRButtonUp

Simulates that the right mouse button is up in the current location of mouse pointer.

WindowFromPoint

Retrieves a handle to the window that contains the specified point.