Reporting the Mouse Status

The fg_mousepos() function returns the current mouse cursor position. Its two parameters (passed by reference) respectively receive the horizontal and vertical coordinates of the mouse cursor. The cursor position is expressed in virtual buffer coordinates; use the fg_xclient() and fg_yclient() functions to translate the values to client coordinates if necessary. If the mouse cursor is outside the client area, or if you haven't called the fg_mouseini() function, fg_mousepos() returns -1 for both coordinates. In Fastgraph for DOS, note that fg_mousepos() includes a third parameter to receive the mouse button status.

<< Prev

Next >>

Fastgraph Home Page


copyright 2001 Ted Gruber Software, Inc.