Click here to Skip to main content
15,908,172 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Disable User Logoff Pin
Iain Clarke, Warrior Programmer20-Apr-12 4:56
Iain Clarke, Warrior Programmer20-Apr-12 4:56 
GeneralRe: Disable User Logoff Pin
softwaremonkey20-Apr-12 5:25
softwaremonkey20-Apr-12 5:25 
QuestionEnumerate or list all files on computer Pin
Brandon-X1200018-Apr-12 5:11
Brandon-X1200018-Apr-12 5:11 
QuestionRe: Enumerate or list all files on computer Pin
David Crow18-Apr-12 5:13
David Crow18-Apr-12 5:13 
AnswerRe: Enumerate or list all files on computer Pin
Brandon-X1200018-Apr-12 7:55
Brandon-X1200018-Apr-12 7:55 
AnswerRe: Enumerate or list all files on computer Pin
David Crow18-Apr-12 9:49
David Crow18-Apr-12 9:49 
AnswerRe: Enumerate or list all files on computer Pin
Richard MacCutchan18-Apr-12 5:17
mveRichard MacCutchan18-Apr-12 5:17 
AnswerRe: Enumerate or list all files on computer Pin
smags1318-Apr-12 8:38
smags1318-Apr-12 8:38 
You could use FindFirstFile and FindNextFile to enumerate files/folders in a specified directory/drive. Listing the Files in a Directory[^] shows an example using these two functions. You will also get file/folder attributes when the functions successfully return.

Write a recursive function so it will enumerate subdirectories.

An alternative is using Shell interfaces such as IShellFolder and IEnumIDList combined with some Shell functions like SHGetDataFromIDList and SHGetDesktopFolder. It's bit more complicated than the other one, but it's more flexible. Consider this approach if FindFirstFile/FindNextFile method doesn't fit your need.

Also, you mentioned that you need to put the list of files/folders into a box. Loading this kind of huge list of items takes a long long time using default Windows control settings. Take a look at Virtual List Control at About List-View Controls[^]. You will happy to see your executable run more smoothly than the others at the end.

You can also try to google your concerns as suggested by Richard MacCutchan. Appending your keywords with "MSDN" or "Codeproject" will normally show good results. Wink | ;)
AnswerRe: Enumerate or list all files on computer Pin
JohnCz24-Apr-12 2:04
JohnCz24-Apr-12 2:04 
Questionhow to move dialog in activex control? Pin
mir546517-Apr-12 23:10
mir546517-Apr-12 23:10 
QuestionRe: how to move dialog in activex control? Pin
David Crow18-Apr-12 2:07
David Crow18-Apr-12 2:07 
QuestionReference to a variable that goes out of scope Pin
elelont217-Apr-12 11:26
elelont217-Apr-12 11:26 
AnswerRe: Reference to a variable that goes out of scope Pin
Aescleal17-Apr-12 13:10
Aescleal17-Apr-12 13:10 
AnswerRe: Reference to a variable that goes out of scope Pin
Erudite_Eric17-Apr-12 22:31
Erudite_Eric17-Apr-12 22:31 
GeneralRe: Reference to a variable that goes out of scope Pin
Stefan_Lang20-Apr-12 4:10
Stefan_Lang20-Apr-12 4:10 
GeneralRe: Reference to a variable that goes out of scope Pin
Erudite_Eric20-Apr-12 22:04
Erudite_Eric20-Apr-12 22:04 
Question[solved ]: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 0:31
AmbiguousName17-Apr-12 0:31 
QuestionRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 3:10
David Crow17-Apr-12 3:10 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 5:31
AmbiguousName17-Apr-12 5:31 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
Richard MacCutchan17-Apr-12 4:49
mveRichard MacCutchan17-Apr-12 4:49 
AnswerRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 5:31
AmbiguousName17-Apr-12 5:31 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 5:37
David Crow17-Apr-12 5:37 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 5:51
AmbiguousName17-Apr-12 5:51 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
David Crow17-Apr-12 6:01
David Crow17-Apr-12 6:01 
GeneralRe: 'MAKEINTRESOURCE' - Not Working Properly Pin
AmbiguousName17-Apr-12 6:07
AmbiguousName17-Apr-12 6:07 

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.