Click here to Skip to main content
16,006,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question on adjusting app window size. Pin
ThatsAlok25-Apr-05 1:30
ThatsAlok25-Apr-05 1:30 
GeneralRe: Question on adjusting app window size. Pin
Anonymous25-Apr-05 2:18
Anonymous25-Apr-05 2:18 
GeneralRe: Question on adjusting app window size. Pin
ThatsAlok25-Apr-05 18:48
ThatsAlok25-Apr-05 18:48 
GeneralFindFirst/FindNext just finds "." or ".." Pin
ThinkingPrometheus25-Apr-05 0:47
ThinkingPrometheus25-Apr-05 0:47 
GeneralRe: FindFirst/FindNext just finds "." or ".." Pin
Mike Dimmick25-Apr-05 1:39
Mike Dimmick25-Apr-05 1:39 
GeneralRe: FindFirst/FindNext just finds "." or ".." Pin
Brad Bruce25-Apr-05 2:08
Brad Bruce25-Apr-05 2:08 
GeneralRe: FindFirst/FindNext just finds "." or ".." Pin
ThinkingPrometheus25-Apr-05 4:07
ThinkingPrometheus25-Apr-05 4:07 
GeneralRe: FindFirst/FindNext just finds "." or ".." Pin
Mike Dimmick25-Apr-05 5:15
Mike Dimmick25-Apr-05 5:15 
Brad, I'm sorry, you're wrong. After FindFirstFile returns successfully, fd contains the attributes of the first file that matches the file specification. FindNextFile returns non-zero until it has returned all the files unless some other error occurs. You can find out why it returned FALSE by checking GetLastError. If no more files were found the last error code is ERROR_NO_MORE_FILES.

Your code will skip the first file and process the last file twice.

My code is derived from many working programs, which have been well tested and deployed in production.

My experience is that FindFirstFile appears to perform a capture operation - it actually finds all the matching files and stores them in an in-memory structure. FindNextFile then hands out the next entry in that structure until it runs out. The effect of this is that any files added to or deleted from the folder after FindFirstFile is called will not be found (or will be found, if deleted).

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: FindFirst/FindNext just finds "." or ".." Pin
Brad Bruce25-Apr-05 6:00
Brad Bruce25-Apr-05 6:00 
GeneralArtist / Album on Audio CD Pin
Anorexic Tribble25-Apr-05 0:24
Anorexic Tribble25-Apr-05 0:24 
GeneralRe: Artist / Album on Audio CD Pin
Alexander M.,25-Apr-05 3:22
Alexander M.,25-Apr-05 3:22 
GeneralRe: Artist / Album on Audio CD Pin
Maximilien25-Apr-05 3:27
Maximilien25-Apr-05 3:27 
GeneralRe: Artist / Album on Audio CD Pin
Anorexic Tribble25-Apr-05 3:47
Anorexic Tribble25-Apr-05 3:47 
GeneralRe: Artist / Album on Audio CD Pin
Michael Dunn25-Apr-05 6:27
sitebuilderMichael Dunn25-Apr-05 6:27 
GeneralSurface using C++ or .NET Pin
Majid Shahabfar25-Apr-05 0:16
Majid Shahabfar25-Apr-05 0:16 
GeneralRe: Surface using C++ or .NET Pin
deldeep25-Apr-05 1:04
deldeep25-Apr-05 1:04 
GeneralHelp Problem Running Vedio in VC++ Pin
Ezhil Nilavan A25-Apr-05 0:06
Ezhil Nilavan A25-Apr-05 0:06 
GeneralDWORD Pin
fardak24-Apr-05 23:52
fardak24-Apr-05 23:52 
GeneralLocalization API (exists?) Pin
zopiro24-Apr-05 23:47
zopiro24-Apr-05 23:47 
GeneralActiveX Controls in Dialogbar Pin
azprivat24-Apr-05 23:40
azprivat24-Apr-05 23:40 
Generalsearch current folder for file Pin
Stirfie24-Apr-05 21:28
Stirfie24-Apr-05 21:28 
GeneralRe: search current folder for file Pin
P-Rex24-Apr-05 22:24
P-Rex24-Apr-05 22:24 
GeneralHardware information Pin
sunit524-Apr-05 21:16
sunit524-Apr-05 21:16 
GeneralRe: Hardware information Pin
ThatsAlok25-Apr-05 1:31
ThatsAlok25-Apr-05 1:31 
GeneralRe: Hardware information Pin
sunit525-Apr-05 1:57
sunit525-Apr-05 1:57 

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.