OnOpenFile example for C++ Builder

void __fastcall TForm1::ShowOpenDlg3Click(TObject *Sender) 
{
   LEADDlgFile1->DialogTitle = "LEADTOOLS Open dialog box";
   LEADDlgFile1->InitialDir = "c:\\images";
   LEADDlgFile1->DlgFileFlags = DLG_OPEN_ALLOWMULTI; 
   LEADDlgFile1->MaxFileSize = 0; 
   LEADDlgFile1->MaxFileTitleSize = 0; 

   LEADDlgFile1->DlgFlags = DLG_OPEN_SHOW_PROGRESSIVE     |
                           DLG_OPEN_SHOW_MULTIPAGE       |
                           DLG_OPEN_SHOW_LOADROTATED     |
                           DLG_OPEN_SHOW_LOADCOMPRESSED  |
                           DLG_OPEN_SHOW_FILEINFO        |
                           DLG_OPEN_SHOW_PREVIEW         |
                           DLG_OPEN_SHOW_DELPAGE         |
                           DLG_OPEN_VIEWTOTALPAGES         |
                           DLG_OPEN_LOADBITMAP            |
                           DLG_OPEN_GENERATETHUMBNAIL; 

   LEADDlgFile1->LEADImage = LEADImage1; 
   LEADDlgFile1->ShowOpenDlg ( this ); 
}
//---------------------------------------------------------------------------

int __fastcall TForm1::LEADDlgFile1OpenFile(int nFilePercent, 
      int nTotalPercent) 
{
   Caption= LEADDlgFile1->FileName
   if ( nFilePercent == 100 ) 
   {
      LEADImage1->Bitmap= LEADDlgFile1->Bitmap; 
      LEADImage2->Bitmap= LEADDlgFile1->Thumbnail
   }
   return SUCCESS; 
}