home *** CD-ROM | disk | FTP | other *** search
- /* EXAMPLE 12: Updating covered windows automatically
- ----------------------------------------------------------------------*/
- #include <conio.h>
- #include <dos.h>
- #include "wndwc21.h"
-
- void main()
- {
- qinit();
- initwindow( LIGHTGRAY_BG, 1, 0 );
- setwindowmodes( VIRTUALMODE );
- setvirtualsize( 20, 100 ); /* 20 rows by 100 columns */
- makewindow( 5, 20, 15, 40, LIGHTCYAN+BLUE_BG, WHITE+BLUE_BG,
- SINGLE_BORDER, WINDOW1 );
- setwindowmodes( 0 ); /* Back to default modes. */
- makewindow( 7, 30, 16, 18, WHITE+GREEN_BG, GREEN_BG, DOUBLE_BORDER,
- WINDOW2 );
- #ifdef __TURBOC__
- delay( 2000 ); /* Make sure we see where the cursor is. */
- #else
- suspend( 2000 );
- #endif
- writetovirtual( WINDOW1 ); /* Now write to the virtual screen */
- qfill(1,1,crt_rows,crt_cols,SAMEATTR,'?'); /* Fill screen w/data */
- titlewindow( TOP, LEFT, YELLOW+BLUE_BG, " Virtual Window " );
- wwrite( 4, 8, " >" ); /* Let's get our bearings. */
- qwriteeos( tws.wndwattr+BLINK, "+" );
- qwriteeos( SAMEATTR, "<- Row 4, Column 10 " );
- vviewrc( 4, 10 );
- vupdatewindow(); /* Update the complete window on the CRT. */
- #ifdef __TURBOC__
- delay( 1000 );
- #else
- suspend( 1000 );
- #endif
- removewindow();
- #ifdef __TURBOC__
- delay( 2000 ); /* Make sure we see where the cursor is. */
- #else
- removewindow();
- #endif
- getch();
- }
-