Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFileDialog error with Windows 98

Status
Not open for further replies.

foxjoker

Programmer
Jul 5, 2000
22
US
Hi all,

I use a CFileDialog object in my application, and although it works on perfect with Windows 2000, it does not with windows 98.
Here is my code :


CFileDialog *browse;
browse=new CFileDialog(true,"bin",NULL,OFN_HIDEREADONLY,"Binary Files (*.bin)|*.bin||",NULL);
browse->m_pOFN->lStructSize=(DWORD)sizeof(OPENFILENAME);
if(browse->DoModal()==IDCANCEL)
{
DWORD err;
err=CommDlgExtendedError();
if (err)
MessageBox("File browsing not available",NULL,MB_OK|MB_ICONINFORMATION);
return;
}


With Windows 98, it never show the box. When I search for error , I got CDERR_STRUCTSIZE, but I do initialize the struct size, so I cannot see where is the problem !!!

If someone has an idea...

foxjoker
 
hi,
are the language of the 3 system: develop, run2k, run98
the same ?
 
Well, I develop on a PC with W2000, and it acts quite the same with W98.

But I think I have a library problem, because CFileDialog description doesn't match members given by intellisense. The main difference is OPENFILENAME structure, which is m_pOFN in my code, and m_ofn in help.

 
hi,

see something as "redist" and/or "commdlg.dll" in your
VC++ doc.

Be careful when/if you substitute dll in the target machine:

your app may go, but office or other may not:

backup system or dll before subs.


bye
 
Thanks, I have to be very careful, because my application is in use in many sites, so I will search for another solution if it exists.

Bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top