Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

directory listing in c++

This topic is 6649 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
If you want to use MFC, you can do this fairly easily using a CListBox::dir() function.

If you do not wish to use MFC, the regular windows way to do this is to use the FindFirstFile and FindNextFile() in a loop. You can specify wildcards in your search, so using the "*.*" method to find all files in a directory will work. You will also need to watch for subdirectories, as those will also appear in the search.

good luck


*oof*

Share this post


Link to post
Share on other sites
Maybe you can use GetOpenFileName() (look it up in the msdn). It''s a common dialog control and I use it all the time.

But then again, it might not be suited for you because you are doing your own gui style thingy.

Jaap Suter

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!