Click here to Skip to main content
15,902,445 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Tomasz Sowinski12-Jul-01 2:30
Tomasz Sowinski12-Jul-01 2:30 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Michael Martin12-Jul-01 3:37
professionalMichael Martin12-Jul-01 3:37 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Tomasz Sowinski12-Jul-01 3:49
Tomasz Sowinski12-Jul-01 3:49 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Michael Martin12-Jul-01 3:53
professionalMichael Martin12-Jul-01 3:53 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Tomasz Sowinski12-Jul-01 4:06
Tomasz Sowinski12-Jul-01 4:06 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Michael Martin12-Jul-01 4:18
professionalMichael Martin12-Jul-01 4:18 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Tomasz Sowinski12-Jul-01 4:25
Tomasz Sowinski12-Jul-01 4:25 
GeneralRe: CFileFind (Maybe I'll get an answer this time) Pin
Michael Dunn12-Jul-01 6:11
sitebuilderMichael Dunn12-Jul-01 6:11 
it definitely told me to use FindNextFile() before I could do anything with the files. This is wrong.

No, your confusion comes from the bad design of FindNextFile(). In your previous code, you had
while ( finder.FindNextFile(...) )
which seems logical. One would think that FindNextFile() returns false once you iterate through the entire list of files. However, it returns false when you hit the last file, not after you hit the last file. So your test needs to be something like:
BOOL bGo = TRUE;
  
while ( bGo )
  {
  bGo = finder.FindNextFile(...);
  // ...process the next file here...
  }
So in summary, when FindNextFile() returns FALSE, there is still one more file to process.

--Mike--
http://home.inreach.com/mdunn/
Push the button, Frank.
GeneralDevelop with style Pin
- Emanuele -12-Jul-01 1:59
- Emanuele -12-Jul-01 1:59 
GeneralRe: Develop with style Pin
Tomasz Sowinski12-Jul-01 2:06
Tomasz Sowinski12-Jul-01 2:06 
GeneralRe: Develop with style Pin
NormDroid12-Jul-01 2:09
professionalNormDroid12-Jul-01 2:09 
Generalwhere can find the fastest "LineTO" code? ro how to do! Pin
G.Richard11-Jul-01 23:35
G.Richard11-Jul-01 23:35 
GeneralRe: where can find the fastest Pin
Tomasz Sowinski12-Jul-01 1:01
Tomasz Sowinski12-Jul-01 1:01 
GeneralRe: where can find the fastest Pin
G.Richard12-Jul-01 20:01
G.Richard12-Jul-01 20:01 
GeneralRe: where can find the fastest Pin
Tomasz Sowinski12-Jul-01 23:44
Tomasz Sowinski12-Jul-01 23:44 
GeneralTranspareten window -(CBitmap::BitBlt) Pin
11-Jul-01 23:12
suss11-Jul-01 23:12 
GeneralRe: Transpareten window -(CBitmap::BitBlt) Pin
Tomasz Sowinski12-Jul-01 1:11
Tomasz Sowinski12-Jul-01 1:11 
GeneralRe: Transpareten window -(CBitmap::BitBlt) Pin
12-Jul-01 1:40
suss12-Jul-01 1:40 
GeneralError ... Pin
12-Jul-01 2:33
suss12-Jul-01 2:33 
GeneralRe: Error ... Pin
Tomasz Sowinski12-Jul-01 2:42
Tomasz Sowinski12-Jul-01 2:42 
GeneralRe: Error ... Pin
12-Jul-01 3:16
suss12-Jul-01 3:16 
GeneralRe: Error ... Pin
Tomasz Sowinski12-Jul-01 3:31
Tomasz Sowinski12-Jul-01 3:31 
GeneralMemory monitoring Pin
Geetha11-Jul-01 22:38
Geetha11-Jul-01 22:38 
GeneralRe: Memory monitoring Pin
Tomasz Sowinski12-Jul-01 1:25
Tomasz Sowinski12-Jul-01 1:25 
GeneralUsing of one object in three dialog ... Pin
Hadi Rezaee11-Jul-01 22:37
Hadi Rezaee11-Jul-01 22:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.