Catastrophic error in CFileDialog

  • Thread starter Thread starter Norman Diamond
  • Start date Start date
N

Norman Diamond

Guest
In dlgfile.cpp, CFileDialog::ApplyOFNToShellDialog() is called every time my program calls CFileDialog::DoModal().

The first time I call CFileDialog::DoModal(), CFileDialog::ApplyOFNToShellDialog() properly calls IFileDialog::SetFileTypes().

The second time I call CFileDialog::DoModal(), CFileDialog::ApplyOFNToShellDialog() calls IFileDialog::SetFileTypes() again, gets E_UNEXPECTED, and crashes my program.

I'm not going to check if newer versions of Visual Studio fixed this. 10 was the new 6. A workaround is to set bVistaStyle to FALSE when calling the constructor.

Continue reading...
 
Back
Top