home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / c / WNDWC21.ZIP / EX11.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-01  |  1.2 KB  |  31 lines

  1. /*     EXAMPLE 11:  Virtual window sizing
  2.      ----------------------------------------------------------------------*/
  3.      #include <conio.h>
  4.      #include <dos.h>
  5.      #include "wndwc21.h"
  6.  
  7.      void main()
  8.      {
  9.          qinit();
  10.          initwindow( LIGHTGRAY_BG, 1, 0 );
  11.          setwindowmodes( VIRTUALMODE );
  12.          setvirtualsize( 20, 100 );              /* 20 rows by 100 columns */
  13.          makewindow( 5, 20, 15, 40, LIGHTCYAN+BLUE_BG, WHITE+BLUE_BG,
  14.                      SINGLE_BORDER, WINDOW1 );
  15.          writetovirtual( WINDOW1 );     /* Now write to the virtual screen */
  16.          qfill(1,1,crt_rows,crt_cols,SAMEATTR,'?');  /* Fill screen w/data */
  17.          titlewindow( TOP, LEFT, YELLOW+BLUE_BG, " Virtual Window " );
  18.          wwrite( 4, 8, " >" );                  /* Let's get our bearings. */
  19.          qwriteeos( tws.wndwattr+BLINK, "+" );
  20.          qwriteeos( SAMEATTR, "<- Row 4, Column 10 " );
  21.          vupdatewindow();         /* Update the complete window on the CRT. */
  22. #ifdef __TURBOC__
  23.          delay (4000);            /* Make sure we see where the cursor is. */
  24. #else
  25.          suspend (4000);
  26. #endif
  27.          removewindow();
  28.          getch();
  29.      }
  30.  
  31.