RgnChange example for C++ Builder
The following code for the RasterView RgnChange event updates a text box using the GetRgnArea method. You can test it by adding a text box for the lesson described in Outlining, Dragging, and Pasting a Region.
void __fastcall TForm1::LEADRasterView1RgnChange (TObject *Sender)
{
AnsiString MyText;
MyText= "Number of pixels in region: ";
MyText= MyText + IntToStr((int)LEADRasterView1->Raster->GetRgnArea ());
ShowMessage (MyText);
}