比如输入http://sina.com/index.htm就会显示HTML代码不需要解译HTML语言,我只需要能下载内容就可以了,谢谢!!!有的话发给我呀!!!
我的EMAIL:[email protected]
发了EMAIL后回复一下,便于我给你分!!!

解决方案 »

  1.   

    CInternetSession session;    CInternetFile *file = (CInternetFile*) session.OpenURL("http://www.sina.com"); 
    CString temp;
        while (file->ReadString(temp) != NULL) 
    {
    m_Text+=temp;
    UpdateData(FALSE);
        }记得编译的时候#include <afxinet.h>m_Text是一个多行Edit的CString变量
      

  2.   

    我按照你的做了啊提示错误错误内容为
    --------------------Configuration: httphtml - Win32 Debug--------------------
    Compiling resources...
    Compiling...
    httphtmlDlg.cpp
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(176) : error C2065: 'CInternetSession' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(176) : error C2146: syntax error : missing ';' before identifier 'session'
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(176) : error C2065: 'session' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(178) : error C2065: 'CInternetFile' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(178) : error C2065: 'file' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(178) : error C2059: syntax error : ')'
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(180) : error C2227: left of '->ReadString' must point to class/struct/union
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(180) : fatal error C1903: unable to recover from previous error(s); stopping compilation
    Generating Code...
    Compiling...
    httphtml.cpp
    Generating Code...
    Error executing cl.exe.httphtml.exe - 8 error(s), 0 warning(s)
      

  3.   

    记得编译的时候#include <afxinet.h>
      

  4.   


    记得编译的时候#include <afxinet.h>m_Text是一个多行Edit的CString变量
      

  5.   

    #include <afxinet.h>
    我填加了啊!!
    m_text我没填加,
      

  6.   

    我填加了m_text了,可是还有这么多错误:
    --------------------Configuration: httphtml - Win32 Debug--------------------
    Compiling...
    httphtmlDlg.cpp
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(176) : error C2065: 'CInternetSession' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(176) : error C2146: syntax error : missing ';' before identifier 'session'
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(176) : error C2065: 'session' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(178) : error C2065: 'CInternetFile' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(178) : error C2065: 'file' : undeclared identifier
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(178) : error C2059: syntax error : ')'
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(180) : error C2227: left of '->ReadString' must point to class/struct/union
    F:\MY DOCUMENTS\临时程序\httphtml\httphtmlDlg.cpp(180) : fatal error C1903: unable to recover from previous error(s); stopping compilation
    Generating Code...
    Compiling...
    httphtml.cpp
    Generating Code...
    Error executing cl.exe.httphtml.exe - 8 error(s), 0 warning(s)