a//-------------------------------------------------------------------
// ECLWinMetrics::GetYpos
//
// Move window 10 pixels.
//-------------------------------------------------------------------
void Sample82() {
ECLWinMetrics *Metrics; // Ptr to object
long X, Y;
try {
Metrics = new ECLWinMetrics('A'); // Create for connection A
if (Metrics->IsMinimized() || Metrics->IsMaximized()) {
printf("Cannot move minimized or maximized window.\n");
}
else {
X = Metrics->GetXpos();
Y = Metrics->GetYpos();
Metrics->SetXpos(X+10);
Metrics->SetYpos(Y+10);
}
delete Metrics;
}
catch (ECLErr Err) {
printf("ECL Error: %s\n", Err.GetMsgText());
}
} // end sample