Microsoft KB Archive/19955

Function 5 - Get Button Press Information PSS ID Number: Q19955 Article last modified on 05-27-1993 PSS database name: H_Mouse

1.x 2.x 3.x 4.x 5.x 6.x 7.x 8.x

MS-DOS

Summary:

You can use mouse driver function 5, Get Button Press Information, to obtain the mouse cursor position with respect to button presses.

Inputs:

AX = 5 BX = 0 –> get LEFT button information BX = 1 –> get RIGHT button information

Outputs:

AX = 0 if button is currently not pressed AX = 1 if button is currently pressed BX = count of button presses since last call to this function CX = cursor position (horizontal) at last press DX = cursor position (vertical) at last press

More Information:

The maximum value that can be returned for AX (button press count) is 32767. After the returned button count is zero, the returned cursor position is unchanged upon successive calls to this function.

This function is especially useful if you need to detect button events within particular rectangular fields on the display. (Button events are also are known as “button clicks.”)

Additional reference words: 7.00 7.04 7.05 8.00 8.10 8.20 9.00

Copyright Microsoft Corporation 1993.