ShowErosionFilterDlg example for C++ Builder

void __fastcall TForm1::ShowErosionFilterDlg1Click(TObject *Sender) 
{
   L_INT nRet; 
   LEADDlgImgEffect1->BinaryFilterType = BFLT_EROSION_HORZ; 
   LEADDlgImgEffect1->DlgFlags = DLG_EROSIONFILTER_SHOW_PREVIEW |
                                  DLG_EROSIONFILTER_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgImgEffect1->LEADImage = LEADImage1; 

   nRet= LEADDlgImgEffect1->ShowErosionFilterDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      LEADImage1->BinaryFilter ( LEADDlgImgEffect1->BinaryFilterType ); 
   }
}