OnRgnChange example for C++ Builder
void __fastcall TForm1::Lead1RgnChange(TObject *Sender)
{
/* Declare a local variable. */
AnsiString MyText;
MyText = "Number of pixels in region: " + IntToStr(Lead1
>GetRgnArea());
Edit1->Text = MyText;
}