UINT CSendFDlg::Send(LPVOID lpParam)
{
CSendFDlg * ths = (CSendFDlg *)lpParam;
bool isFileEof = false;
long pos;
CString str;
long lReadNum = 0;
while (!isFileEof)
{
pos = ths->m_file.Read(ths->data,1);
if (lReadNum == ths->m_lFileLength)
{
isFileEof = true;
}
if (!isFileEof)
{
lReadNum++;
ths->data++;
ths->m_ctl_progress_sendfile.OffsetPos(1);
}
str.Format("%d",lReadNum);
ths->GetDlgItem(IDC_STATIC_POS)->SetWindowText(str);
}
//回写测试
ths->data -= ths->m_lFileLength;
CFile mFile(_T("c:\\tmp1.264"), CFile::modeWrite|CFile::modeCreate);
mFile.Write(ths->data,ths->m_lFileLength);
AfxMessageBox("回写操作结束");
return 0;
}
