网页文件读取到文本框控件中 数据读取不完整,有些行没有读取完整被截取了。初学帮忙分析下
CString strbuf;
// TODO: Add your control notification handler code here
if(!m_strHtml.IsEmpty())
{
m_strHtml.Empty();
} GetDlgItem(IDC_EDIT1)->GetWindowText(m_strUrl);
CInternetSession  session;
//CHttpConnection* connection=session.GetHttpConnection(m_strUrl);
// connection->OpenRequest()
//char *ch;
CStdioFile* file=session.OpenURL(m_strUrl);
while (file->ReadString(strbuf))
{

m_strHtml   +=   "\r\n";
m_strHtml+=file->ReadString(strbuf.GetBuffer(strbuf.GetLength()),strbuf.GetLength()); }
file->Close();
GetDlgItem(IDC_EDIT2)->SetWindowText(m_strHtml);  UpdateData(FALSE);