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>
    short _FAR _wrapon( short wrap );

Description:
    The _wrapon function is used to control the display of text when the
    text output reaches the right side of the text window.  This is text
    displayed with the  _outtext and  _outmem functions.  The wrap argument
    can take one of the following values:

    _GWRAPON
        causes lines to wrap at the window border

    _GWRAPOFF
        causes lines to be truncated at the window border


Returns:
    The _wrapon function returns the previous setting for wrapping.

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

    main()
    {
        int i;
        char buf[ 80 ];

        _setvideomode( _TEXTC80 );
        _settextwindow( 5, 20, 20, 30 );
        _wrapon( _GWRAPOFF );
        for( i = 1; i <= 3; ++i ) {
            _settextposition( 2 * i, 1 );
            sprintf( buf, "Very very long line %d", i );
            _outtext( buf );
        }
        _wrapon( _GWRAPON );
        for( i = 4; i <= 6; ++i ) {
            _settextposition( 2 * i, 1 );
            sprintf( buf, "Very very long line %d", i );
            _outtext( buf );
        }
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _outtext, _outmem, _settextwindow

See Also: _outtext _outmem

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