Controls word wrap.
#include <graph.h>
short __far _wrapon( short option );
option | Wrap condition |
The _wrapon function controls whether text output with both the _outmem and the _outtext functions wraps to a new line or is simply clipped when the text output reaches the edge of the defined text window. The option argument can be one of the following manifest constants:
Constant | Meaning |
_GWRAPOFF | Truncates lines at window border |
_GWRAPON | Wraps lines at window border |
Note that this function does not affect the output of presentation-graphics routines or font routines.
The function returns the previous value of option. There is no error return.
Standards:None
16-Bit:DOS, QWIN, WIN, WIN DLL
32-Bit:None
_outtext, _outmem, _scrolltextwindow, _settextwindow
/* WRAPON.C */
#include <conio.h>
#include <graph.h>
void main( void )
{
_wrapon( _GWRAPON );
while( !_kbhit() )
_outtext( "Wrap on! " );
_getch();
_outtext( "\n\n" );
_wrapon( _GWRAPOFF );
while( !_kbhit() )
_outtext( "Wrap off! " );
_getch();
_outtext( "\n\n" );
}
Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap
on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on!
Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wr
ap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap on! Wrap o
n! Wrap on! Wrap on!
Wrap off! Wrap off! Wrap off! Wrap off! Wrap off! Wrap off! Wrap off! Wrap