ShowAddBorderDlg example for C++ Builder

void __fastcall TForm1::ShowAddBorderSlg1Click(TObject *Sender) 
{
   L_INT i; 
   L_INT nRet; 
   AnsiString FileNames [ 3 ]= {   "e:\\image1.jpg",
                                 "e:\\image2.jpg",
                                 "e:\\image3.jpg" };

   LEADDlgImage1->ItemsCount = 3; 


   for ( i= 0; i < 3; i++ ) 
   {
      LEADImage2->LoadStamp ( FileNames[i] ); 
      LEADDlgImage1->ItemDescription [i]= IntToStr(i); 
      LEADDlgImage1->ItemFileName [i]= FileNames[i]; 
      LEADDlgImage1->ItemBitmap [i]= LEADImage2->Bitmap; 
   }

   LEADDlgImage1->BitmapIndex = 1; 

   LEADDlgImage1->DlgFlags = DLG_ADDBORDER_SHOW_PREVIEW |
                             DLG_ADDBORDER_SHOW_TOOL_ZOOMLEVEL |
                             DLG_ADDBORDER_SHOW_TOOL_SHOWEFFECT |
                             DLG_ADDBORDER_SHOW_TOOL_ONSCREEN |
                             DLG_ADDBORDER_SHOW_TOOL_RESET; 
   LEADDlgImage1->LEADImage = LEADImage1; 
   nRet= LEADDlgImage1->ShowAddBorderDlg ( this ); 
   if ( nRet == SUCCESS_DLG_OK ) 
   {
      LEADImage1->AddBorder ( LEADDlgImage1->LeftThickness
                             LEADDlgImage1->TopThickness

                             LEADDlgImage1->RightThickness
                             LEADDlgImage1->BottomThickness
                             LEADDlgImage1->Location
                             LEADDlgImage1->BorderStyle
                             LEADDlgImage1->EffectStyle
                             LEADDlgImage1->SelectedBitmap
                             LEADDlgImage1->GradientStyle
                             LEADDlgImage1->GradientStartColor
                             LEADDlgImage1->GradientEndColor
                             LEADDlgImage1->CurveIntensity
                             LEADDlgImage1->SoftCurve
                             LEADDlgImage1->UseShadow
                             LEADDlgImage1->ShadowSize
                             LEADDlgImage1->ShadowDirection
                             LEADDlgImage1->BumpyShadow ); 
   }
}