CStringArray列表排序
CStringArray m_arrayFolderList; //CStringArray列表
//功能: CStringArray列表排序
//输入: 无
//输出: 无
void TF_PhotoGroupDlg::TF_SortFileNames()
{
int FileCount=m_arrayFolderList.GetSize();
CString TmpStr;
int iPos;
if (FileCount>0)
{
for(int i=0;i<FileCount-1;i++)
{
TmpStr=m_arrayFolderList.GetAt(i);
iPos = i;
for (int j=i+1;j<FileCount;j++)
{
if (m_arrayFolderList.GetAt(j)<TmpStr)
{
TmpStr=m_arrayFolderList.GetAt(j);
iPos=j;
}
}
m_arrayFolderList.SetAt(iPos,m_arrayFolderList.GetAt(i));
m_arrayFolderList.SetAt(i,TmpStr);
}
}
}