C Language Development Kit/Functions/LoadDisplay
From OptiWiki
< C Language Development Kit | Functions(Redirected from C Language Development Kit/Functions/Loaddisplay)
| Description | Restores the pixels of a screen display that were previously stored in a file. This function is useful when implementing help
screens after which the original screen must be restored. | ||||
| Syntax | int loaddisplay(char * filename); | ||||
| Arguments | Points to a string containing the name of a file into which a screen display was stored previously with
char * filename savedisplay(). | ||||
| Returns |
| ||||
| Remarks | The settings of the font, cursor and contrast from the orginal screen are also restored. | ||||
| Example | #include "lib.h" #include <stdio.h> void main( void ) { int turn; printf("\fThis is screen\nnumber ONE."); savedisplay("screen1.dat"); delay( 100 ); printf("\fThis is screen\nnumber TWO."); savedisplay("screen2.dat"); turn = 1; for(;;) { resetkey(); while( !kbhit()) idle(); if( turn == 1) { loaddisplay("screen1.dat"); turn = 2; } else { loaddisplay("screen2.dat"); turn = 1; } } } |
