Sets the number of screen rows for text modes.
#include <graph.h>
short __far _settextrows( short rows );
rows | Number of text rows |
The _settextrows function specifies the number of screen rows to be used in text modes.
If the constant _MAXTEXTROWS is specified for the rows argument, the _settextrows function will choose the maximum number of rows available. In text modes, this is 50 rows on VGA, 43 on EGA, and 25 on others. In graphics modes that support 30 or 60 rows, _MAXTEXTROWS specifies 60 rows. In SVGA modes, _MAXTEXTROWS specifies the vertical resolution (as returned in a _videoconfig struct by the _getvideoconfig function) divided by 8.
This function returns the numbers of rows set. The function returns 0 if an error occurred.
Standards:None
16-Bit:DOS
32-Bit:None
_getvideoconfig, _outtext, _setvideomode, _setvideomoderows
/* STXTROWS.C: This program attempts to set the screen height. It returns
* an errorlevel code of 1 (fail) or 0 (success) that could be tested in
* a batch file.
*/
#include <graph.h>
#include <stdlib.h>
void main( int argc, char **argv )
{
short rows;
if( !(rows = atoi( argv[1] )) )
{
_outtext( "\nSyntax: STXTROWS [ 25 | 43 | 50 ]\n" );
exit( 1 );
}
/* Make sure new rows are the same as requested rows. */
if( _settextrows( rows ) != rows )
{
_outtext( "\nInvalid rows\n" );
exit( 1 );
}
else
exit( 0 );
}