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);

相关文章:

  • 2022-01-07
  • 2021-11-11
  • 2022-02-07
  • 2021-09-21
  • 2022-02-09
  • 2021-10-26
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2021-07-07
  • 2021-09-20
  • 2021-04-18
  • 2021-11-19
  • 2021-12-26
相关资源
相似解决方案