HolesRemovalRgn example for C++ Builder
L_INT TForm1::DoHolesRemovalRgn ( L_HRGN hRegn, L_INT nOffsetX, L_INT nOffsetY )
{
/* put the predefined region */
LEADImage1->SetRgnHandle( hRegn, nOffsetX, nOffsetY, L_RGN_SET );
/* Remove holes */
return LEADImage1->HolesRemovalRgn( );
}