(注释:不是文章,自己随手记的)
HANDLE hFind;
WIN32_FIND_DATA wfd;
if ( !SetCurrentDirectory(strPath) )
return;
hFind = FindFirstFile(_ucT("*.*"), &wfd);
if ( hFind == INVALID_HANDLE_VALUE )
return;
while(FindNextFile(hFind, &wfd))
{
if ( (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && !(wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) )
{
if ( wfd.cFileName[0] != '.' )
{
UCString temp = (UCString)strPath + wfd.cFileName;
if ( HasSubFolder(ucLPCTSTR(temp)) )
{
}
}
}
}
SetCurrentDirectory(_ucT(".."));