Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    short _FAR _settextcursor( short cursor );

Description:
    The _settextcursor function sets the attribute, or shape, of the cursor
    in text modes.  The argument cursor specifies the new cursor shape.  The
    cursor shape is selected by specifying the top and bottom rows in the
    character matrix.  The high byte of cursor specifies the top row of the
    cursor; the low byte specifies the bottom row.

    Some typical values for cursor are:


         Cursor          Shape

         0x0607          normal underline cursor
         0x0007          full block cursor
         0x0407          half-height block cursor
         0x2000          no cursor


Returns:
    The _settextcursor function returns the previous cursor shape when the
    shape is set successfully; otherwise, (-1) is returned.

See Also:
    _gettextcursor, _displaycursor

Example:
    #include <conio.h>
    #include <graph.h>

    main()
    {
        int old_shape;

        old_shape = _gettextcursor();
        _settextcursor( 0x0007 );
        _outtext( "\nBlock cursor" );
        getch();
        _settextcursor( 0x0407 );
        _outtext( "\nHalf height cursor" );
        getch();
        _settextcursor( 0x2000 );
        _outtext( "\nNo cursor" );
        getch();
        _settextcursor( old_shape );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

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