CFileDialog doesn't update when I change the file type.
-
I am using CFileDialog for a "save as" where I have to choices for file types: All Files or Avi Files. I noticed something very strange and discovered it is DIRECTLY related to Managed C++. First of all, the "save as" function is done correctly, so 99% of the problem is solved. It comes up with All Files and indeed shows all files. The problem comes when I change to show only avi files. The window goes blank. If I go back to all files, it stays blank. Only if I choose a different folder is it refreshed properly (with either all or avi files). I tried it in Paint and there if you change the file type, the window refreshes correctly. In CFileDialog it doesn't. My code is: CFileDialog filedlg( FALSE, "avi", // default extension "mip1.avi", // current file name OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_LONGNAMES, "All Files (*.*)|*.*|Avi Files (*.avi)|*.avi||", NULL); Since starting to look into this problem I found out that the problem exists ONLY when I use Managed extensions. When I turn off Managed extensions, it refreshes perfectly, like it has always done. To complete the picture I tried GetSaveFileName( &ofn) and that shows exactly the same behaviour. Has anyone else seen this, or can tell me what is wrong? Thanks, Ilan