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>_wrapon() enable or disable text line wrap</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _wrapon()               Enable or disable text line wrap

 #include   <graph.h>

 short far _wrapon( option );
  short option;     Wrap condition

    _wrapon() controls whether text wraps to a new line or is simply
    clipped when it reaches the edge of the defined text window. The wrap
    condition is selected using one of the following manifest constants
    for option:

    Constant     Meaning
    ---------    --------------------------------
    _GWRAPOFF    Truncates lines at window border
    _GWRAPON     Wraps lines at window border

       Returns:     _wrapon() returns the previous value of the wrap
                    option.

         Notes:     Text is wrapped on a simple character count basis,
                    with no recognition of word boundaries, etc., as is
                    common in editors.

                    If wrapping is off, the output location of succeeding
                    text must be repositioned to a new line or no text
                    will be visible past the window boundary.

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

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

    This program defines a text window and fills it with wrapping turned
    on, then with wrapping turned off.

           #include <graph.h>

           char wrap_on[] = {"This is scrolling with text wrapping on. "};
           char wrap_off[] = {"No scrolling with wrapping off. "};

           main()
           {
              int i;

              _wrapon( _GWRAPON );
              _settextwindow( 4, 40, 10, 70);
              for ( i = 0; i < 20; i++)
                  _outtext( wrap_on );

              _wrapon( _GWRAPOFF );
              _settextwindow( 14, 40, 20, 70);
              for ( i = 0; i < 20; i++)
                  _outtext( wrap_off );
           }


See Also: _settextwindow() _settextposition() _moveto()

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