Syntax
int LoadDisplay(
char *filename
);
Parameters
- filename
-
[in] Points to a string containing the name of a file into which a screen display was stored previously with SaveDisplay function.
Return value
Returns the OK or ERROR of the function.
Value | Description |
---|---|
OK | Opened the file and loaded the contents into the screen display. |
ERROR | Could not open the file. |
Remarks
If the specified file cannot be opened, an error will be returned.
If data other than screen data is stored in the specified file, the screen status will be undefined.
This function is useful, for example, when you want to overwrite a new screen on a screen that needs to be undone.
If data other than screen data is stored in the specified file, the screen status will be undefined.
This function is useful, for example, when you want to overwrite a new screen on a screen that needs to be undone.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
#include <stdio.h>
#include "lib.h"
void main(void)
{
printf("[LoadDisplay]\n");
printf("Please any key\r");
ResetKey();
while(!kbhit())
Idle();
printf("\fThis is screen\nnumber ONE.");
SaveDisplay("screen1.dat");
Delay(100);
printf("\fThis is screen\nnumber TWO.");
SaveDisplay("screen2.dat");
printf("\fPlease any key\r");
ResetKey();
while (!kbhit())
Idle();
LoadDisplay("screen1.dat");
printf("Please any key\r");
ResetKey();
while (!kbhit())
Idle();
LoadDisplay("screen2.dat");
printf("Please any key\r");
ResetKey();
while (!kbhit())
Idle();
}
Last updated: 2020/10/02