I'm trying to set up a filter for the OpenFile dialog box which has both the prefix and file type already preset, with the wild card in the middle. (Using VS08, cpp)
FileFilter.Format("Prefix_(*.gdd)|Prefix_*.gdd|Any GDD File|*.gdd|all files|*.*|");
FileDialog = new CFileDialog(...);
The problem is that the Prefix_*.gdd
filter isn't showing any files even though there is one present.
The filter works for an Explorer search - sho开发者_如何学运维uld it work here?
I found the mistake. The 'Prefix_' string, which was programatically generated, had the classic confusion between date
and data
, so the data files with date in their file names weren't found, leaving the OpenFile dialog empty.
It now appears to work properly.
精彩评论