LDialogFile::DoModalFileConversion

#include "ltwrappr.h"

virtual L_INT LDialogFile::DoModalFileConversion(hWndOwner)

HWND hWndOwner;

handle of the window which owns the dialog

Displays the File Conversion dialog box, and gets the options for converting files.

Parameter

Description

hWndOwner

Handle of the window which owns the dialog.

Returns

SUCCESS_DLG_CLOSE

The "Close" button was pressed, and the dialog exited successfully.

SUCCESS_DLG_CANCEL

The "Cancel" button was pressed, and the dialog exited successfully.

< 1

An error occurred. Refer to Return Codes.

Comments

LDialogFile::SetFileConversionParams must be called before using this function to set the initial values for the dialog. You can get the updated FILECONVERSIONDLGPARAMS with the values entered by the user through the dialog by using LDialogFile::GetFileConversionParams.

Notes:

The File Conversion dialog.

Required DLLs and Libraries

LTDLGFILE
LTDLGKRN
LTDLGUTL
LTDLGCTRL
LTDLGCOM
LTFIL
LTDIS
LTIMG

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

Class Members, LDialogFile::GetFileConversionParams, LDialogFile::SetFileConversionParams, LBase::EnableCallBack, LDialogBase::EnablePreview, LDialogBase::EnableAutoProcess, LDialogBase::EnableToolbar, LDialogBase::Free, LDialogBase::Initialize, LBitmapBase::Save, LBitmapList::Save, LBitmapBase::Load

Topics:

Using Imaging Common Dialog

 

NAPLPS Format (NAP)

Example

L_INT LDialogFile_DoModalFileConversionExample(LBitmap * pBitmap, HWND hWnd) 
{ 
   L_INT nRet = 0; 
   LDialogFile DlgFile; 
   DlgFile.SetBitmap (pBitmap); 
   nRet = LDialogFile::Initialize (0); 
   if(nRet != SUCCESS) 
      return nRet; 
   FILECONVERSIONDLGPARAMS DlgParams ; 
   memset ( &DlgParams, 0, sizeof ( FILECONVERSIONDLGPARAMS ) ) ; 
   DlgParams.uStructSize           = sizeof ( FILECONVERSIONDLGPARAMS ) ; 
   DlgParams.uOverwrite            = DLG_FILECONVERSION_OVERWRITE_SKIP ; 
   DlgParams.pFileFormats          = NULL ; 
   DlgParams.nFileFormatsCount     = 0 ; 
   DlgParams.bUseLogReport         = TRUE ; 
   DlgParams.bRemoveSrcFile        = FALSE ; 
   DlgParams.bShowFullPath         = TRUE ; 
   DlgParams.bUseOriginalFolder    = TRUE ; 
   DlgParams.pszSrcFileList         = NULL ; 
   DlgParams.uDlgFlags             = DLG_FILECONVERSION_SHOW_LOADOPTIONS                 | 
   DLG_FILECONVERSION_SHOW_FILEINFO                    | 
   DLG_FILECONVERSION_SHOW_PREVIEW_PAGES               | 
   DLG_FILECONVERSION_SHOW_RESIZE                      | 
   DLG_FILECONVERSION_SHOW_ROTATE                      | 
   DLG_FILECONVERSION_SHOW_NAMINGTEMPLATE              | 
   DLG_FILECONVERSION_SHOW_OVERWRITE                   | 
   DLG_FILECONVERSION_SHOW_OVERWRITE_ALL               | 
   DLG_FILECONVERSION_SHOW_ADD                         | 
   DLG_FILECONVERSION_SHOW_ADDFOLDER                   | 
   DLG_FILECONVERSION_SHOW_REMOVE                      | 
   DLG_FILECONVERSION_SHOW_SELECTALL                   | 
   DLG_FILECONVERSION_SHOW_DELETEORIGINAL ; 
   DlgFile.EnableCallBack (FALSE); 
   nRet = DlgFile.SetFileConversionParams (&DlgParams) ; 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = DlgFile.DoModalFileConversion(hWnd); 
   if(nRet < 1) 
      return nRet; 
   // Gets the updated values for the structure 
   nRet = DlgFile.GetFileConversionParams (&DlgParams, sizeof(DlgParams)) ; 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = LDialogFile::Free (); 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Common Dialog C++ Class Library Help