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 Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    short _FAR _settextrows( short rows );

Description:
    The _settextrows function selects the number of rows of text displayed
    on the screen.  The number of rows is specified by the argument rows.
     Computers equipped with EGA, MCGA and VGA adapters can support
    different numbers of text rows.  The number of rows that can be selected
    depends on the current video mode and the type of monitor attached.

    If the argument rows has the value _MAXTEXTROWS, the maximum number of
    text rows will be selected for the current video mode and hardware
    configuration.  In text modes the maximum number of rows is 43 for EGA
    adapters, and 50 for MCGA and VGA adapters.  Some graphics modes will
    support 43 rows for EGA adapters and 60 rows for MCGA and VGA adapters.

Returns:
    The _settextrows function returns the number of screen rows when the
    number of rows is set successfully; otherwise, zero is returned.

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

    int valid_rows[] = {
        14, 25, 28, 30,
        34, 43, 50, 60
    };

    main()
    {
        int i, j, rows;
        char buf[ 80 ];

        for( i = 0; i < 8; ++i ) {
            rows = valid_rows[ i ];
            if( _settextrows( rows ) == rows ) {
                for( j = 1; j <= rows; ++j ) {
                    sprintf( buf, "Line %d", j );
                    _settextposition( j, 1 );
                    _outtext( buf );
                }
                getch();
            }
        }
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX
See Also:
    _getvideoconfig, _setvideomode, _setvideomoderows

See Also: _getvideoconfig _setvideomode

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