◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── /* WGSCRBUF.C - Demonstrate examining the * current size of a QuickWin window's * screen buffer */ #include <io.h> #include <stdio.h> #define NUMWINS 4 /* Number of windows */ #define OPENFLAGS "w" /* Access permission */ void main() { int nSize; /* Size of screen buffer */ int nRes; /* Write result */ FILE *wp; /* File pointer */ /* Open a window */ /* NULL arguments accept default characteristics */ wp = _fwopen( NULL, NULL, OPENFLAGS ); if( wp == NULL ) { printf( "***ERROR:_fwopen\n" ); exit( -1 ); } /* Get the size of its screen buffer */ nSize = _wgetscreenbuf( _fileno( wp ) ); nRes = fprintf( wp, "Screen buffer holds %i chars\n", nSize ); nRes = _wclose( _fileno( wp ), _WINPERSIST ); exit( 0 ); } -♦-