home *** CD-ROM | disk | FTP | other *** search
- #include <scl1.h>
- #include <scl1keys.h>
- #include <scl1clor.h>
-
- /********************
- Window function */
-
- /* screen data is stored in these buffers, use W_BUF_SIZE macro to calculate
- buffer size. See file window2.c for an example of using CreateWindow,
- DestroyWindow and WriteWindow */
-
- char buffer1[W_BUF_SIZE(0,0,24,79)];
- char buffer2[W_BUF_SIZE(9,26,15,52)];
-
- main()
- {
- char WFlag1=-2; /* save do not clear screen */
- char WFlag2=0; /* save and clear screen */
-
- Window(BLACK_WHITE,0,0,24,79,&WFlag1,buffer1);
-
- FillBlock(WHITE_BLACK,0,0,24,79,'X');
-
- WriteScreenLen(BLACK_WHITE,24,0,70," The whole screen has been saved, press any key...");
- GetKey();
-
- Window(WHITE_BLACK,9,26,15,52,&WFlag2,buffer2);
-
- WriteScreenLen(BLACK_WHITE,24,0,70," A second window was SAVED AND CLEARED, press any key to restore it...");
- GetKey();
-
- Window(WHITE_BLACK,9,26,15,52,&WFlag2,buffer2);
-
- WriteScreenLen(BLACK_WHITE,24,0,70," Press any key to restore the screen...");
- GetKey();
-
- Window(BLACK_WHITE,0,0,24,79,&WFlag1,buffer1);
- }