July 10th, 2013, 04:34 AM
Wildcards! Which one?
Im working on a simple file list program that list folders and files using CFileFind. Heres how the program goes!
1. User types a directory in a edit box
2. Presses button and files and folders get listed.
**If user wants to go back a directory
1. Presses the back button
And the back button is my problem. I know the problem is the Wildcard format. Im using a CString with a addition "/.." eg....(CString cp = m_Directory + "/..");
I tried CString cp = m_Directory + "/.." + "*.*" and vice versa with no luck
My question is how do I add a "*.*" to the CString cp? If I don't add "*.*", I know that all the files will not get listed.Only one folder gets listed when I press the back button
Can you help me with this problem.
oh yeah. Here is the code im using for the back button
CString oke = m_o;
CString FileName, DirName;
DirName = oke + "/..";
BeWorking = OneFile.FindFile (DirName);
BeWorking = OneFile.FindNextFile () ;
if (OneFile.IsDots ()) continue;
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!