void CMoveFIleDlg::OnMove()
{
BROWSEINFO bi;
char buffer[MAX_PATH];
ZeroMemory(buffer,MAX_PATH);
bi.hwndOwner=GetSafeHwnd();
bi.pidlRoot=NULL;
bi.pszDisplayName=buffer;
bi.lpszTitle="选择一个文件夹";
bi.ulFlags=BIF_EDITBOX;
bi.lpfn=NULL;
bi.lParam=0;
bi.iImage=0;
LPITEMIDLIST pList=NULL;
if((pList=SHBrowseForFolder(&bi))!=NULL)
{
char path[MAX_PATH];
ZeroMemory(path,MAX_PATH);
SHGetPathFromIDList(pList,path);
for(int i=0;i<m_filelist.GetItemCount();i++)
{
CString pathtemp;
pathtemp.Format("%s\\%s",path,GetNameFromPath(m_filelist.GetItemText(i,0)));
::MoveFile(m_filelist.GetItemText(i,0),pathtemp);
}
AfxMessageBox("移动文件完成");
}
}