Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_gettextwindow() get boundaries of current text window</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _gettextwindow()        Get boundaries of current text window

 #include   <graph.h>

 void _far _gettextwindow(r1, c1, r2, c2);
 short _far *r1;        Top row of window
 short _far *c1;        Left column of window
 short _far *r2;        Bottom row of window
 short _far *c2;        Right column of window

    _gettextwindow() gets the boundaries of the current text window on
    the screen, returning the row and column boundaries as (r1, c1)
    (r2, c2). Also see _settextwindow().

 Portability:   Not supported by the ANSI standard.

   -------------------------------- Example ---------------------------------

    This program scrolls different parts of the screen:

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

    void main()
    {
    short scrow, mleft, mtop, mright, mbot;
    struct rccoord rcstruc;

    _clearscreen(_GCLEARSCREEN);
    for(scrow = 1; scrow <= 20; scrow++)
    {
        _settextposition(scrow, 1);
        printf("Hello. This is line %d", scrow);
    }
    getch();

    _settextwindow(1, 1, 25, 8);
    _scrolltextwindow(-5);
    getch();

    _settextposition(5, 1);
    rcstruc = _gettextposition();
    _gettextwindow(&mtop, &mleft, &mbot, &mright);
    _settextwindow(rcstruc.row, mleft, mbot, mright);
    _scrolltextwindow(_GSCROLLUP);
    getch();

    _setvideomode(_DEFAULTMODE);
    }

See Also: _settextcursor() _settextwindow()

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