Hi,
I'm having major problems with GET_FILTERED_FILE@ within Windows 7 related to the new Win7 file dialog and it's Libraries feature. The problem appears in programs compiled with any version of ftn95 including 5.40 but seems to be dependent upon the size of the Libraries (in this case my Documents library). I'm using Windows 7 x86 (but x64 is the same), Win32 compilation.
What I find is that when I launch a file open dialog initially everything seems okay, but as I navigate through my folders and libraries the right-hand pane of the file dialog starts to take a long time to refresh and eventually ends up showing no files, or hanging and not allowing folder to be selected, or incorrectly showing no entries in the library. This can happen after selecting only a couple of libraries in succession, or after a minute or two of jumping around my folders.
The demo below can be used to repeat the problem
winapp
include <windows.ins>
character(len=260):: title, file, path
integer, parameter:: NFILTERS = 2
character(len=32):: filternames(NFILTERS),filterspecs(NFILTERS)
integer:: mustexist
title = 'Open File Test'
file = ''
path = ''
filternames(1) = 'Fortran Source Files'
filterspecs(1) = '*.f90;*.f95'
filternames(2) = 'All Files'
filterspecs(2) = '*.*'
mustexist = 1
call GET_FILTERED_FILE@(title, file, path, filternames, filterspecs, NFILTERS, mustexist)
end program
When you run this it brings up a file open dialog. Clicking around fairly randomly in the left hand side between the various Libraries (Documents, Music, Pictures etc.) or Favourites locations, interspersed with double-clicking on folders and sub-folders on the right-hand side I eventually end up with the right hand side taking ages to generate, and eventually it either doesn't update when the left hand side is clicked, or clicking on a library will result in a 'the folder is empty' message. It may take 20-30 seconds of clicking around randomly, or may happen immediately.
If you drill down directly into the file system using the Computer section on the left, however, it's absolutely fine.
The problem also occurs if I call the standard file open dialog from within a VC++ DLL called from Fortran or even when using the newer IFileOpenDialog Shell interface directly. It does not happen, however, if I use the same code from within a VC++ program (ie. no ftn95 involved).
The problem is worst on my main machine with a 100gig Documents library however I've repeated it on two more machines, although it can take a bit more clicking around to make it go bad.
It's driving me nuts and I'd be really interested to know if anyone else can repeat this problem, and whether anyone can come up with a solution. I can always force the old XP-style dialog but that's not a great solution, and the code always worked in Vista which uses the same common dialog interface.
Thanks, Alan