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>
    struct rccoord _FAR _gettextposition( void );

Description:
    The _gettextposition function returns the current output position for
    text.  This position is in terms of characters, not pixels.

    The current position defaults to the top left corner of the screen,
    (1,1), when a new video mode is selected.  It is changed by successful
    calls to the  _outtext,  _outmem,  _settextposition and  _settextwindow
    functions.

    Note that the output position for graphics output differs from that for
    text output.  The output position for graphics output can be set by use
    of the  _moveto function.

Returns:
    The _gettextposition function returns, as an rccoord structure, the
    current output position for text.

See Also:
    _outtext, _outmem, _settextposition, _settextwindow, _moveto, _moveto_w

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

    main()
    {
        struct rccoord old_pos;

        _setvideomode( _TEXTC80 );
        old_pos = _gettextposition();
        _settextposition( 10, 40 );
        _outtext( "WATCOM Graphics" );
        _settextposition( old_pos.row, old_pos.col );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

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