|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
#include <conio.h> void _set_screen_lines(int nlines);
This function sets the text screen width to 80 and its height to the
value given by nlines, which can be one of the following: 25, 28,
35, 40, 43 or 50. On a CGA, only 25-line screen is supported. On an
EGA, you can use 25, 35 and 43. VGA, PGA and MCGA support all of the
The number of columns (i.e., screen width) is 80 for all of the above
resolutions, because the standard EGA/VGA has no way of changing it.
After this function returns, calls to
gettextinfo() will return
the actual screen dimensions as set by
That is, you can e.g. test whether
by checking the screen height returned by
the desired height.
This function has a side effect of erasing the screen contents, so
application programs which use it should make their own arrangements to
It's not safe to call this function inside static constructors, because conio needs to be initialized, and its initialization is done by a static constructor. Since you don't have any control on the order in which static constructors are called (it's entirely up to the linker), you could have problems.
If you can detect the situation when one of the conio functions is
called for the very first time since program start, you could work
around this problem by calling the
manually (this is the function called by a static constructor).
|webmaster||delorie software privacy|
|Copyright © 2004 by DJ Delorie||Updated Apr 2004|