Example
The following example shows how to return a pointer to the field data indicated by the Plane parameter.
/-------------------------------------------------------------------
// ECLField::GetScreen
//
// Iterate over list of fields and print each fields text contents.
//-------------------------------------------------------------------
void Sample35() {
ECLPS *PS; // Pointer to PS object
ECLFieldList *FieldList; // Pointer to field list object
ECLField *Field; // Pointer to field object
char *Buff; // Screen data buffer
ULONG BuffLen;
try {
PS = new ECLPS('A'); // Create PS object for 'A'
BuffLen = PS->GetSize() + 1; // Make big enough for entire screen
Buff = new char[BuffLen]; // Allocate screen buffer
FieldList = PS->GetFieldList(); // Get pointer to field list
FieldList->Refresh(); // Build the field list
for (Field = FieldList->GetFirstField(); // First field
Field != NULL; // While more
Field = FieldList->GetNextField(Field)) { // Next field
Field->GetScreen(Buff, BuffLen); // Get this fields text
printf("%02lu,%02lu: %s\n", // Print "row,col: text"
Field->GetStartRow(),
Field->GetStartCol(),
Buff);
}
delete []Buff;
delete PS;
}
catch (ECLErr Err) {
printf("ECL Error: %s\n", Err.GetMsgText());
}
} // end sample