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, November 8, 2006 8:04:04 AM(UTC)
jon-paul.faucher

Groups: Registered
Posts: 15


I am trying to replace my CFileDiaog with the ILEADRasterDlgFile but I keep getting ERROR_DLG_NOTINITIATED as a return code. Below is the code I used to set up the object. Any help would be greatly appreciated.

Thanks,

jp

--------------------------------- Sample Code

#import <ltrdf14n.dll> no_namespace, named_guids

ILEADRasterDlgFile * m_pRasterFileDlg;
 
HRESULT hr = CoCreateInstance(CLSID_LEADRasterDlgFile,
                                                               NULL,
                                                               CLSCTX_ALL,
                                                               IID_ILEADRasterDlgFile,
                                                               (void**)&m_pRasterFileDlg);
 if(FAILED(hr))
{
   return FALSE;
}
 
m_pRasterFileDlg->EnableMethodErrors = FALSE;
 
m_pRasterFileDlg->PutFilter("");
m_pRasterFileDlg->PutFileDlgFlags(0);
m_pRasterFileDlg->PutFileName("");
m_pRasterFileDlg->PutDialogTitle("Open Stamp File");
m_pRasterFileDlg->PutUIFlags(OPEN_SHOW_MULTIPAGE |
                                                            OPEN_SHOW_PREVIEW |
                                                            OPEN_USEFILESTAMP |
                                                            OPEN_SHOW_FILEINFO |
                                                            OPEN_SHOW_LOADOPTIONS |
                                                            OPEN_SHOW_LOADCOMPRESSED |
                                                            OPEN_SHOW_LOADROTATED |
                                                            OPEN_SHOW_DELPAGE |
                                                            OPEN_SHOW_PDFOPTIONS |
                                                            OPEN_SHOW_RASTEROPTIONS |
                                                            OPEN_SHOW_VECTOROPTIONS |
                                                            OPEN_VIEWTOTALPAGES |
                                                            OPEN_ENABLESIZING);
 
int nRet = m_pRasterFileDlg->ShowOpenDlg((long)this->m_hWnd);
 
if ((nRet == 0) && (m_pRasterFileDlg->GetDialogStatus() == /*DLG_OK*/100))
{
   LoadFile(m_pRasterFileDlg->GetFileName());
}
 

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 : Thursday, November 9, 2006 10:58:30 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 355


Jon Paul,
At the beginning of your program, you need to initialize the dialogs using the InitDlg method of LEADRasterDlgKrn object.
At the termination of your program, call the FreeDlg method.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.279 seconds.