Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>setcursor()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SETCURSOR()
 Sets the cursor form
------------------------------------------------------------------------------
 Syntax

     SETCURSOR([[<nCursorType>],[<lMode>]]) --> nCursor

     or:

     SETCURSOR([[<idCursorForm>],[<lMode>]]) --> nCursor

     or:

     SETCURSOR([[<nTopLine>,<nBottomLine>], [<lMode>]])
        --> nCursor

 Arguments

     <nCursorType>  Designates a cursor type between 0 and 4 (see Clipper
     5.0, SETCURS.CH).

     <idCursorForm>  Designates a value previously returned from this
     function.  The <nCursor> return value is a 16-bit integer.

     <nTopLine>  Designates the beginning scan line of the new cursor.

     <nBottomLine>  Designates the ending scan line of the new cursor.

     <lMode>  Designates whether the cursor is set to the overwrite (.F.)
     or the insert (.T.) mode.  The default value (.F.) designates that the
     cursor is set to the overwrite mode.

 Returns

     If the SETCURSOR() function is called with parameters, it returns the
     previous setting.  When the function is called without parameters, it
     returns the current cursor setting.  When a value between 0 and 4 is
     returned, then the cursor type was set through CA-Clipper's SETCURSOR()
     function.  When the return value is less than 0, the return value is the
     cursor value that had been set using <nTopLine> and <nBottomLine>.

 Description

     SETCURSOR() is also a function under CA-Clipper.   The CA-Clipper Tools
     implementation makes several extensions available over and above the
     CA-Clipper function.  When the CTUS.LIB extended driver is linked in,
     these extensions become available.

     One method for using the SETCURSOR() function is with only a numeric
     parameter between 0 and 4.  With this parameter, the function is
     CA-Clipper compatible.  Please refer to your CA-Clipper documentation
     for the cursor type corresponding to the individual values.

     The second method for using the SETCURSOR() is exclusively for restoring
     a cursor type previously saved from the return value.  A cursor saved
     using GETCURSOR() can also be implemented this way, however, use of the
     GETCURSOR() function for the creation of new applications is not
     recommended!

     The third and last method allows you to implement a cursor completely of
     your own design by specifying the start and stop pixel lines.  Specify
     the <nTopLine> and <nBottomLine>; the first parameter serves as the
     start line, and the second parameter serves as the end line for the
     cursor display.

     In all three variants of this function's syntax, you can determine the
     type of cursor you want to change, in the overwrite or the insert modes,
     by specifying <lMode>.

 Notes

     .  The range used for the <nTopLine> and <nBottomLine> parameters
        is dependent on the screen adapter used and the font installed.

     .  To preserve complete compatibility with the former version of
        the function call without parameter, CT.CH must be linked in.

 Examples

     .  In this example, the cursor for both modes is saved, and then
        restored:

        nNormCursor  :=  SETCURSOR(.F.)         // Overwrite mode
        nInsCursor   :=  SETCURSOR(.T.)         // Insert mode

        * Cursor is changed in the program

        SETCURSOR(nNormCursor, .F.)             // Reset cursor
        SETCURSOR(nInsCursor, .T.)              // Reset cursor

     .  Here is an example of a setting using the first and last pixel
        line:

        SETCURSOR(10, 13)                       // Cursor as thick
                                                // underscore


See Also: GETCURSOR()* CHARPIX()

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