[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
_gtSetPos()
Move the cursor to a new position
------------------------------------------------------------------------------
C Prototype
#include "gt.api"
ERRCODE _gtSetPos(
USHORT uiRow,
USHORT uiCol
)
Arguments
uiRow represents the horizontal position of the cursor. The value
may range from zero to _gtMaxRow().
uiCol represents the vertical position of the cursor. The value may
range from zero to _gtMaxCol().
Returns
_gtSetPos() returns zero if successful. Any other value indicates an
error.
Description
_gtSetPos() moves the cursor to a new position on the screen. After the
cursor is positioned, the CA-Clipper functions ROW() and COL() are
updated accordingly. Before using this function, you may want to save
the current cursor position with _gtGetPos() so that you can restore the
cursor to its original position.
To control the shape and visibility of the cursor, use _gtSetCursor().
Examples
. This example creates a simple function that displays a string
at a specific screen location:
#include "gt.api"
void PrintStr( USHORT uiRow, USHORT uiCol, BYTEP fpStr );
void PrintStr( USHORT uiRow, USHORT uiCol, BYTEP fpStr )
{
_gtSetPos( uiRow, uiCol ); // Set new position
_gtWrite( fpStr, strlen( fpStr ) ); // Write string
}
Files Library is CLIPPER.LIB, header file is Gt.api.
See Also:
_gtGetCursor()
_gtGetPos()
_gtSetCursor()
_gtWrite()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson