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>
    struct rccoord _FAR _settextposition( short row,
                                          short col );

Description:
    The _settextposition function sets the current output position for text
    to be (row,col) where this position is in terms of characters, not
    pixels.

    The text position is relative to the current text window.  It defaults
    to the top left corner of the screen, (1,1), when a new video mode is
    selected, or when a new text window is set.  The position is updated as
    text is drawn with the  _outtext and  _outmem 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 _settextposition function returns, as an rccoord structure, the
    previous output position for text.

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

See Also:
    _gettextposition, _outtext, _outmem, _settextwindow, _moveto

See Also: _gettextposition _outtext

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