Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new to mfc and windows programmig

Status
Not open for further replies.

vitellozzo

Programmer
Oct 15, 2003
8
IT
Hello
I'm developing a program using MFC, but i'm new to them and it doesn't work properly.
The program must recursively search a directory and its subdir for one or more kind of file and merge them.
Theese files are selected through checkboxes and merged by kind: for example all files named alm_sent_bin, in all dir and subdir, must generate a unique log file alm_sent_bin.
the problem is that program catches only the file present in the first dir examined, if it's located in a successive dir he sees it but doesn't merge it with other files found, or , if it's the only one, creates an empty file. I belive i've written a bad search algorithm, something get overwritten somewhere, but being new to mfc can't find where.
Do someone know where can i find a good example for handling file search?
Thanks in advance
Regards
Vitellozzo
 
Hey, vitellozzo. You should probably post the part of your code that does the search in order for somebody to pick your algorithm errors if any available. Since you say you are new to MFC, what kind of programming have you been practising before? Someone may point you to algorithms written in a language or environment you are feeling comfortable with. I don't think that something would change if you were good at MFC and again had a bad search algorithm. Algorithms are universal no matter in what language you do them, moreover MFC is not even a language but some helper class library for those using MS Visual C++. I have used similar recursive searching before and I could post the code here but it is in Object Pascal. It should make the algorithm clear, however. It should be easy to convert to C++ and MFC. If you want the code send a reply to this forum and I will post it.

best regards,
Ivan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top