Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Common Dialogs don't appear...I get a -1093 error
Started by scochard@webstudio.com at 04-04-2008 14:40. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  04-04-2008, 14:40
scochard@webstudio.com is not online. Last active: 4/4/2008 7:36:13 PM scochard@webstudio.com

Not Ranked
Joined on 07-08-2003
Posts 2
Common Dialogs don't appear...I get a -1093 error
Reply Quote

I'm trying to get a couple of the Lead dialogs to work. I copied the code from your documentation for one and it gives me a -1093 error  after DoModal.  The l_error.h file doesn't have a -1093 error in it.

 

Here's the code:

LDialogImageEffect dlg;

LDialogImageEffect::Initialize(0);

dlg.SetBitmap((LBitmapBase*)pLeadBitmap);

GAUSSIANBLURDLGPARAMS parms;

memset (&parms,0,sizeof(GAUSSIANBLURDLGPARAMS));

parms.uStructSize = sizeof(GAUSSIANBLURDLGPARAMS);

result = dlg.EnableCallBack(FALSE);

result = dlg.EnablePreview(TRUE);

result = dlg.EnableToolbar(TRUE);

result = dlg.SetGaussianBlurParams(&parms);

result = dlg.DoModalGaussianBlur(pView->m_hWnd);

//Get Info

result = dlg.GetGaussianBlurParams(&parms, sizeof(GAUSSIANBLURDLGPARAMS));

result = LDialogImageEffect::Free();


   Report 
  04-06-2008, 12:25
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Common Dialogs don't appear...I get a -1093 error
Reply Quote
This error means 'LTDLGIMGEFX.DLL is not loaded'. Did you load this DLL using the LoadLibraries function using the LT_DLGIMGEFX flag?
Adam Boulad
LEADTOOLS Technical Support

   Report 
  04-07-2008, 17:08
scochard@webstudio.com is not online. Last active: 4/4/2008 7:36:13 PM scochard@webstudio.com

Not Ranked
Joined on 07-08-2003
Posts 2
Re: Common Dialogs don't appear...I get a -1093 error
Reply Quote

The file I have is named LTDlgImgEFX14n.dll

I'm loading it with:

nRet = LBase::LoadLibraries (LT_DLGIMGEFX);

The error code is "1".

After a bunch of inti code,  I call the L_DlgOpen method to bring up the Open dialog to load a graphic file.

nRet = L_DlgOpen( pView->m_hWnd,&OpenFileName,&FOParm );

The error code with this call is " -152", which is not defined in the Errors.h or the Return Codes in the LEAD documentation for the Class Library.

 

Here's all of the code:

L_INT nRet;

nRet = LBase::LoadLibraries (LT_DLGIMGEFX);

static BITMAPHANDLE Bitmap;

static OPENDLGPARAMS FOParm;

static SAVEDLGPARAMS FSParm;

static FILEINFO foFileInfo;

HWND hWndChild = NULL;

L_BOOL fLoadInfo;

L_BOOL fAutoProcess = TRUE;

static OPENFILENAME OpenFileName;

static L_BOOL bEnablePreview=TRUE;

memset(&FOParm, 0, sizeof(OPENDLGPARAMS));

memset(&OpenFileName, 0, sizeof(OPENFILENAME));

FOParm.uStructSize = sizeof(OPENDLGPARAMS);

FOParm.bShowLoadOptions = FALSE;

FOParm.bPreviewEnabled = TRUE;

FOParm.uDlgFlags = (DLG_OPEN_ENABLESIZING|

DLG_OPEN_SHOW_PREVIEW|

DLG_OPEN_USEFILESTAMP |

DLG_OPEN_SHOW_PROGRESSIVE |

DLG_OPEN_SHOW_MULTIPAGE |

DLG_OPEN_SHOW_DELPAGE |

DLG_OPEN_SHOW_LOADROTATED |

DLG_OPEN_SHOW_LOADCOMPRESSED |

DLG_OPEN_SHOW_LOADOPTIONS |

DLG_OPEN_SHOW_FILEINFO |

DLG_OPEN_SHOW_PDFOPTIONS |

DLG_OPEN_SHOW_RASTEROPTIONS |

DLG_OPEN_SHOW_VECTOROPTIONS |

DLG_OPEN_VIEWTOTALPAGES |

DLG_OPEN_LOADBITMAP);

fAutoProcess = FALSE;

DWORD nOpenIndex;

OpenFileName.lStructSize = sizeof(OPENFILENAME);

OpenFileName.hwndOwner = pView->m_hWnd;

OpenFileName.nFilterIndex = nOpenIndex;

OpenFileName.lpstrTitle = TEXT("Open a File");

//fLoadInfo = LBase::EnableLoadInfo(TRUE);

nRet = L_DlgOpen( pView->m_hWnd,&OpenFileName,&FOParm );

 

 


   Report 
  04-08-2008, 10:45
Adam Boulad is not online. Last active: 10/9/2008 4:18:21 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 425
Re: Common Dialogs don't appear...I get a -1093 error
Reply Quote

This error means ERROR_DLG_NOTINITIATED, You did not initialize the dialogs. This error is defined in the Lterr.h file.

You should initialize the Dialogs before using them, use the L_DlgInit function.
Adam Boulad
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » Common Dialogs » Common Dialogs don't appear...I get a -1093 error

Powered by Community Server, by Telligent Systems