MAL,0);
CloseHandle(hfile);
writefile=new CFile(desname,CFile::modeWrite);
for(int i=1;i<pagecount;i++)
{
srcname.Format("%s\\%spart%d_%s.dat",inidir,pagename,i,pageext);
readfile=new CFile(srcname,CFile::modeRead);
DWORD filelen=readfile->GetLength();
BYTE *b=new BYTE[filelen];
readfile->Read(b,filelen);
writefile->Write(b,filelen);
readfile->Close();
delete b;
}
writefile->Close();
delete writefile;
delete readfile;
AfxMessageBox("合并完成");
}
void CFilePartitionDlg::OnChangeEdfilepath()
{
CString desdirname,temp;
GetDlgItem(IDC_EDFILEPATH)->GetWindowText(desdirname);
int pos=desdirname.Find(filename);
desdirname=desdirname.Left(pos-1);
GetDlgItem(IDC_EDSAVEPATH)->SetWindowText(desdirname);
}
CString CFilePartitionDlg::FindPath(CString path)
{
CString strpathname; //文件所在的路径
CString strtemp; //保存全路径
strtemp=path;
int pos;
int leftpos=0;
pos=strtemp.Find("\\");
while(pos!=-1)
{
leftpos+=pos;
leftpos++;
strtemp=strtemp.Right(strtemp.GetLength()-pos-1);
pos=strtemp.Find("\\");
}
strpathname=path.Left(leftpos);
return strpathname;
}
上一篇:
FilePartition.cpp
下一篇:
电话销售英文简历范文