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 : Monday, June 11, 2007 10:28:48 PM(UTC)

Torsten  
Torsten

Groups: Registered
Posts: 4


I have a problem with initial dirictory.
I set right parametr and call function, but function ignore my parameter and open dialog with last opening state.

See my function in attachment.

The administrator has denied uploads of certain file types and the file must have only one extension (filename.ext).
hm, opendlg.cpp - file have more than one extension ???

ok, i posted right here
bool OpenFileLTDlg(CWnd * pParent, CString & path, LPCTSTR initial_dir)
{
L_INT nRet;
L_BOOL fAutoProcess = FALSE;
OPENFILENAME OpenFileName;
OPENDLGPARAMS FOParm;
L_BOOL bEnablePreview = TRUE;
L_BOOL fShowPreview = TRUE;
L_BOOL fLoadCompressed = TRUE;
L_BOOL fLoadRotated = TRUE;
L_BOOL fShowResize = TRUE;
L_BOOL fTotalPages = TRUE;
L_BOOL fDoPaintWhileLoad = FALSE;

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

FOParm.uStructSize = sizeof(OPENDLGPARAMS);
FOParm.bShowLoadOptions = FALSE;
FOParm.bPreviewEnabled = bEnablePreview;
FOParm.uDlgFlags = (fShowResize?DLG_OPEN_ENABLESIZING:0) |
(fShowPreview?DLG_OPEN_SHOW_PREVIEW:0) |
(fShowPreview?DLG_OPEN_USEFILESTAMP:0) |
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 |
(fLoadRotated ?DLG_OPEN_ALWAYSLOADROTATED:0) |
(fLoadCompressed?DLG_OPEN_ALWAYSLOADCOMPRESSED:0) |
(fTotalPages?DLG_OPEN_VIEWTOTALPAGES:0);

if(fDoPaintWhileLoad)
fAutoProcess = FALSE;

OpenFileName.lStructSize = sizeof(OPENFILENAME);
OpenFileName.hwndOwner = pParent->GetSafeHwnd();
OpenFileName.nFilterIndex = 0;
OpenFileName.lpstrTitle = 0;
<b> OpenFileName.lpstrInitialDir = initial_dir; // Init the initial dir</b>

nRet = L_DlgOpen( pParent->GetSafeHwnd(),&OpenFileName,&FOParm );

if (nRet == SUCCESS_DLG_OK)
{
path =FOParm.pFileData[0].szFileName;
return true;
}

return false;
}
 

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, June 13, 2007 4:07:57 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

If you want to attach files, please put them all in one ZIP or RAR file. Also, it's usually better to put a complete working project that shows the problem using minimum code (not your full application).

About the problem you're facing, my guess is that you are using LEADTOOLS 14.5 because the structure and function names are similar to that version. Is this correct?
In any case, I think this is a limitation in the common dialogs imposed by the operating system. In Windows 2000/XP, if lpstrFile contains a path, that path is the initial directory. Otherwise, lpstrInitialDir specifies the initial directory.

There are other details involved, and it is also different on other operating systems. Try to set the same path in lpstrFile also. If it doesn't work, tell me which OS you're using and attach a small project in a ZIP or RAR file.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Wednesday, June 13, 2007 8:02:20 PM(UTC)

Torsten  
Torsten

Groups: Registered
Posts: 4


<BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="/SupportPortal/cs/Themes/default/images/icon-quote.gif">&nbsp;<strong>Maen Hasan wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4">In any case, I think this is a limitation in the common dialogs imposed by the operating system. In Windows 2000/XP, if lpstrFile contains a path, that path is the initial directory. Otherwise, lpstrInitialDir specifies the initial directory.</td></tr></table></td></tr></table></BLOCKQUOTE>

I not think so. I create test project, with LT Open file dialog and common open file dialog. I inititialized only lpstrInititialDir and common open file dialog works correctly. LT open file dialog opens previous folder.

Please, see that.
Project details : include and library paths to LT sets in project settings.
My LT version :15 with patch.
MY OS version : XP SP 2
My VS version : VS 2005 SP 1
File Attachment(s):
OpenDlgLT.zip (109kb) downloaded 22 time(s).
 
#4 Posted : Sunday, June 17, 2007 12:43:35 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

I checked the same issue using your code and noticed that the LT open dialog and the common open dialog work correctly.
The problem might be related to the LEADTOOLS v15 DLLs and headers that you use.
Please retry the same issue using the latest LEADTOOLS v15 API patch. To obtain the latest v15 API patch, please send your LEADTOOLS v15 serial number to support@leadtools.com and ask about the latest LEADTOOLS v15 API patch.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Sunday, June 24, 2007 12:41:20 AM(UTC)

Torsten  
Torsten

Groups: Registered
Posts: 4


Ok, thanks.
I downloaded latest patch and now dialogs works corretly.
 
#6 Posted : Friday, June 29, 2007 10:14:44 AM(UTC)

Torsten  
Torsten

Groups: Registered
Posts: 4


Dialogs works corretly, but other ...
I try to use LT 15 with 13-06-2007 patch on big projects and found some troubles.

I have are linker error with LFile methods. In debug output i see " unresolved external symbol " with LFile methods so as LFile::SetFilename, LFile::GetInfo, LFIle::Load. Before 13-06-2007 patch LFile methods works without problem.

I attached test project with my trouble.
File Attachment(s):
LFileTrouble.zip (22kb) downloaded 23 time(s).
 
#7 Posted : Monday, July 2, 2007 12:50:46 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

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

Your project does not
use the Unicode character set therefore it's not compatible with our ClassLib DLLs. However, a new build for the ANSI ClassLib DLLs is coming soon.
 
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-2024, Yet Another Forum.NET
This page was generated in 0.150 seconds.