问题
Hey how do I in MFC get names of all folders? Any examples or which classes should I look into? Any hints will be really appreciated. All I saw is the CFile, which as far as I have seen (though very very little) doesn't looks like it has the ability to do what I want. So please direct me.
Thanks
回答1:
Look into CFileFind
There is an old article in DDJ on how to implement a recursive search using CFileFind
.
回答2:
A Google search revealed an nice example in: Listing the Files in a Directory
It uses FindFirstFile, FindNextFile, and FindClose.
回答3:
Look for FindFirstFile in the MFC documentation
来源:https://stackoverflow.com/questions/1520769/mfc-get-folders