Re: Replacing
If you're using MFC, I'd recommend using the MFC classes when in doubt. Go
with CFileFind. This class is simply a wrapper for the API functions.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Gerry Murphy" <gerry_murphy@comcast.net> wrote in message
news:ObUYSvtfIHA.5180@TK2MSFTNGP05.phx.gbl...
Hello, all,
I'm looking for some advice about how best to proceed with some code I'm
porting from 16-bit MFC to 32-bit ( target = VC++ 6.0/MFC).
There are a lot of instances in the existing code that use the archaic
dos-style _dos_findfirst/_dos_findnext to find all files that match a
given mask, including subdirectories of the starting search path, e.g.:
int error = _dos_findfirst(searchPath, _A_SUBDIR, &c_file )
etc.
Some brief research into how to do this in 32-bit Windows reveals multiple
options:
FindFirstFile/FindNextFile
CFileFind
...both of which were mentioned in this newsgroup or
32-bit functions, e.g. _findfirst
There may be others I missed.
What are your recommendations and what are the advantages or disadvantages
of each choice?
It looks like all the choices above require special handling for
subdirectories.
Thanks for any help.
Regards,
Gerry Murphy