-
Finding Files
I am using this source code to search for a file extension:
while (bWorking)
{ bWorking = finder.FindNextFile();
CListBox::AddString(LPCTSTR finder.GetFileTitle()); }
The LPCTSTR is giving me an error: illegal use of this tyep....
Also does anyone know how to search subdirectories as well?
Thanks.
-
Re: Finding Files
You don't need the LPCTSTR in the statement. Try.
while (bWorking)
{ bWorking = finder.FindNextFile();
CListBox::AddString(finder.GetFileTitle()); }
You need a recursive algorithm for traversing subdirectories. The Advanced Windows book by Richter has an SDK sample for doing this