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

Description:
    The _gettextwindow function returns the location of the current text
    window.  A text window is defined with the  _settextwindow function.  By
    default, the text window is the entire screen.

    The current text window is a rectangular area of the screen.  Text
    display is restricted to be within this window.  The top left corner of
    the text window is placed in the arguments (row1,col1).  The bottom
    right corner of the text window is placed in (row2,col2).

Returns:
    The _gettextwindow function returns the location of the current text
    window.

See Also:
    _settextwindow, _outtext, _outmem, _settextposition, _scrolltextwindow

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

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