Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, September 30, 2009 1:29:45 AM(UTC)

makumar  
makumar

Groups: Registered
Posts: 23



Hi,
I am using Document Imaging V14.5 & Delphi as interface. In my application, I have to implement "Save As" behavior. My Image is opened and I pressed "Save As" button. It will open a dialog box. Following is the code I used:
*****************************************************
   LeadDialog1.DialogTitle:= 'Save File As';
   LeadDialog1.MaxFileTitleSize:= 0;
   LeadDialog1.MaxFileSize:= 0;
   LeadDialog1.DlgFileFlags:= 0;

   LeadDialog1.DlgFlags:= DLG_SAVE_SHOW_FILEOPTIONS_PROGRESSIVE;

   LeadDialog1.LEADImage:= LEADImage1;

   nRet:= LeadDialog1.ShowSaveDlg(Self);
*****************************************************
ShowSaveDlg() function opens dialog to save the file. There is a drop down menu "Save Type As" in the dialog box to select the type. This drop down list has lots of options, out of which I need only few.
I need only bmp, jpg & tif file options in the drop down menu.
How I can remove other options from the drop down menu?

Thanks & Regards,
Manoj Kumar

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, September 30, 2009 4:57:35 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

You can do this by using the LEADDlgFile1.FileFormatsCount and LEADDlgFile1.FileFormats properties. For example, the following code shows how to show only LEAD CMP and TIFF formats in the save As dialog:
=============
LEADDlgFile1.DialogTitle:= 'Save A File';
LEADDlgFile1.FileName:= '';
LEADDlgFile1.FileFormatsCount:= 2;

LEADDlgFile1.FileFormats [0].Format:= DLG_FF_SAVE_LEAD;
LEADDlgFile1.FileFormats [0].BppCount:= 1;
LEADDlgFile1.FileFormats [0].FormatBpp [0]:= 24;
LEADDlgFile1.FileFormats [0].SubFormats [0]:= DLG_FF_SAVE_SUB_CMP_NONPROGRESSIVE + DLG_FF_SAVE_SUB_CMP_PROGRESSIVE;

LEADDlgFile1.FileFormats [1].Format:= DLG_FF_SAVE_TIFF;
LEADDlgFile1.FileFormats [1].BppCount:= 1;
LEADDlgFile1.FileFormats [1].FormatBpp [0]:= 24;
LEADDlgFile1.FileFormats [1].SubFormats [0]:= DLG_FF_SAVE_SUB_TIFF1_CCITT + DLG_FF_SAVE_SUB_TIFF1_CCITT_G3_1D +
                                               DLG_FF_SAVE_SUB_TIFF1_CCITT_G3_2D + DLG_FF_SAVE_SUB_TIFF1_CCITT_G4 +
                                               DLG_FF_SAVE_SUB_TIFF1_UNCOMPRESSEDRGB + DLG_FF_SAVE_SUB_TIFF1_RLERGB +
                                               DLG_FF_SAVE_SUB_TIFF1_LZWRGB + DLG_FF_SAVE_SUB_TIFF1_JBIG;

LEADDlgFile1.SaveFileTypeIndex:= DLG_FF_SAVE_LEAD;
LEADDlgFile1.SaveSubTypeIndex:= DLG_FF_SAVE_SUB_CMP_PROGRESSIVE;
LEADDlgFile1.MaxFileTitleSize:= 0;
LEADDlgFile1.MaxFileSize:= 0;
LEADDlgFile1.DlgFileFlags:= 0;
LEADDlgFile1.DlgFlags:= DLG_SAVE_ENABLESIZING +
                           DLG_SAVE_SHOW_FILEOPTIONS_MULTIPAGE +
                           DLG_SAVE_SHOW_FILEOPTIONS_PROGRESSIVE +
                           DLG_SAVE_SHOW_FILEOPTIONS_QFACTOR +
                           DLG_SAVE_SHOW_FILEOPTIONS_STAMP +
                           DLG_SAVE_SHOW_FILEOPTIONS_BASICJ2KOPTIONS +
                           DLG_SAVE_SHOW_FILEOPTIONS_J2KOPTIONS +
                           DLG_SAVE_SHOW_FILEOPTIONS_JBIG2OPTIONS;

LEADDlgFile1.LEADImage:= LEADImage1;
nRet:= LEADDlgFile1.ShowSaveDlg (Self);
=============

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.051 seconds.