Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

This is my first my MFC application, and unfortunately i don't understand, how it works? I found a simple MFC application, which gets the file list of a given path. I modifyed this code for my needs, but now i have one problem. What my application should do is the following. It reads two drive letters from a file. Then gets the file list for both drives, and then compares them. If the primary drive has files which aren't on the secondary drive then it copies it automatically. I did all this, but now i want that it run automatically. Unfortunately, the original MFC application started when i pressed a button. I want to take this out, that i shouldn't press any buttons, it just copies the new files automatically. So my problem is the following. If there are new file on the primary drive my function ( CGetFileListDlg::OnBnClickedButtonGetFileList() which i called in CGetFileListDlg::OnPaint() function) copies the data. This is working fine, but untill the copying isn't finished, i can see only the window's outlines. I can see the only my List Controls, if the copy has finished. This is annoying, because i want print which file am i currently copying. And finally my question is, where should i call my function, so i can see my window during the copying. I can post some code if you need some, but i don't know which one you need :S
Please someone help me!

Thanks in advance!

kampi
Posted
Updated 9-Feb-10 9:34am
v2

1 solution

You can do one of two things. The textbox the user enters the path in to, you can handle the event of the text changing, check if the path entered exists, and show the file list, or you can handle the event of the textbox losing input focus ( this is better ), and do it then.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900