UpdateData(true);  //从控件到成员变量
	CInternetSession session;
	m_html = _T("");
	CHttpFile *file = NULL; 
	try
	{ 
		file	=	(CHttpFile*)session.OpenURL(m_url);
	} 
	catch(CInternetException*	m_pException)
	{ 
		file = NULL;
		m_pException->m_dwError;
		m_pException->Delete();
		session.Close(); 
		AfxMessageBox(_T("CInternetException"));
	} 
	CString strLine; 
	char	sRecived[1024];
	if(file != NULL) 
	{
		while(file->ReadString((LPTSTR)sRecived,1024)!=NULL) 
		{
				m_html += sRecived; 
		} 
	}
	else
	{
		AfxMessageBox(_T("fail")); 
	} 
	session.Close();
	file->Close();
	delete file; 
	file = NULL;
	UpdateData(false);
posted on 2011-04-14 12:32  °ι 、曲 终  阅读(248)  评论(0)    收藏  举报