Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_mgetpos()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_MGETPOS()
 Get mouse cursor position and button status
------------------------------------------------------------------------------

 Syntax

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

 Arguments

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

    <nY> is a variable that will receive the mouse Y position in virtual
    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. The coordinate system in text mode has
    eight virtual coordinates per character cell. Thus x=16 means that you
    are in the Row 2. The values returned by this routine when in text mode
    and with mouse driver versions 6 and above are multiples of 8. We have
    experience with drivers prior to that version

 Examples

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

 Source: MOUSE1.PRG

 Author: Leo Letendre

See Also: FT_MGETCOORD() FT_MSETPOS() FT_MDEFCRS() FT_MGETX() FT_MGETY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson