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>
    void _FAR _settextwindow( short row1, short col1,
                              short row2, short col2 );

Description:
    The _settextwindow function sets the text window to be the rectangle
    with a top left corner at (row1,col1) and a bottom right corner at
    (row2,col2).  These coordinates are in terms of characters not pixels.

    The initial text output position is (1,1).  Subsequent text positions
    are reported (by the  _gettextposition function) and set (by the
     _outtext,  _outmem and  _settextposition functions) relative to this
    rectangle.

    Text is displayed from the current output position for text proceeding
    along the current row and then downwards.  When the window is full, the
    lines scroll upwards one line and then text is displayed on the last
    line of the window.

Returns:
    The _settextwindow function does not return a value.

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

    main()
    {
        int i;
        short r1, c1, r2, c2;
        char buf[ 80 ];

        _setvideomode( _TEXTC80 );
        _gettextwindow( &r1, &c1, &r2, &c2 );
        _settextwindow( 5, 20, 20, 40 );
        for( i = 1; i <= 20; ++i ) {
            sprintf( buf, "Line %d\n", i );
            _outtext( buf );
        }
        getch();
        _settextwindow( r1, c1, r2, c2 );
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _gettextposition, _outtext, _outmem, _settextposition

See Also: _gettextposition _outtext

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