Example
The following is an example of using the GetScreen method.
//-------------------------------------------------------------------
// ECLPS::GetScreen
//
// Get text and other planes of data from the presentation space.
//-------------------------------------------------------------------
void Sample64() {
ECLPS PS('A'); // PS object
char *Text; // Text plane data
char *Field; // Field plane data
ULONG Len; // Size of PS
Len = PS.GetSize();
// Note text buffer needs extra byte for null terminator
Text = new char[Len + 1];
Field = new char[Len];
PS.GetScreen(Text, Len+1); // Get entire screen (text)
PS.GetScreen(Field, Len, FieldPlane); // Get entire field plane
PS.GetScreen(Text, Len+1, 1, 1, 80); // Get line 1 of text
printf("Line 1 of the screen is:\n%s\n", Text);
delete []Text;
delete []Field;
} // end sample