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>_gettextposition() get current text output position</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _gettextposition()      Get current text output position

 #include   <graph.h>

 struct rccoord far _gettextposition( void );

    _gettextposition() returns the row and column position where the next
    text output will occur. The row and column values are based on
    character locations displaced from the upper-left screen corner ( row
    0, column 0).

       Returns:     _gettextposition() returns the row and column
                    coordinates in an rccoord structure, defined in
                    graph.h:

                    struct rccoord {
                       short row;  Row coordinate
                       short col;  Column coordinate
                       };

         Notes:     The current text position does not affect the current
                    image position, which is a separate location based on
                    pixel coordinates.

   Portability:     MS-DOS only, true MDPA, CGA, EGA, MCGA, or VGA video
                    compatibles

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

    This program gets the current text position and resets it to the
    beginning of the next row.

           #include <graph.h>

           char text_buf[255];

           main()
           {
              struct rccoord rc;

              . . . output text . . .

              rc = _gettextposition();
              _settextposition( rc.row+1, 0 );

              . . . output more text . . .

           }


See Also: _settextposition() _outtext() _moveto() _getcurrentposition()

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