FT_MGETCOORD()
Get mouse cursor position (text coord.) and button status
──────────────────────────────────────────────────────────────────────────────

Syntax

FT_MGETPOS( @<nX>, @<nY> ) -> nButtonStatus

Arguments

<nX> is a variable that will receive the mouse X position in text
screen coordinates. It must be passed by reference.

<nY> is a variable that will receive the mouse Y position in text
screen coordinates. It must be passed by reference.

Returns

an integer representing button status

- 0 for no button pressed
- 1 for left pressed
- 2 for right pressed
- 3 for left and right pressed
- 4 for middle pressed
- 5 for left and middle pressed
- 6 for right and middle pressed
- 7 for all three buttons pressed

Description

Loads cursor position into x and y coordinates passed by reference and
returns the button status.

Examples

LOCAL nX, nY
LOCAL nButton := FT_MGETCOORD( @nX, @nY )
? "Mouse Row :", nX
? "Mouse Column :", nY
? "Button Status:", nButton

Source: MOUSE1.PRG

Author: Leo Letendre