要想在自己的程序里显示网页,现在一般的方法是 使用ActiveX控件来 WebBrower,现在我不想使用这个方法,直接在自己的窗口里建立显示网页的窗口,同时去个IHTMLDocument接口,如何做呢,OutLook就是这样的.

解决方案 »

  1.   

    简单一点就使用
    CHtmlView::Navigate2
      

  2.   

    你可以使用HTMLDIALOG NORTON 2004,2005 还有WINDOWS 的增加删除程序都是这么写的非常方便
      

  3.   


    I liked your implementation of CHtml-Ctrl in a dialog. It is exactly what I wanted my app to do. But there's one thing I want to know. Is there a way I can disable the popup menu that results when the user right-clicks on the HTML page? I don't want the user to right-click and view the source of the HTML file I display in my app. I tried overriding WM_CONTEXTMENU in my CHtmlCtrl-derived window, but it doesn't work.http://msdn.microsoft.com/msdnmag/issues/01/09/c/
      

  4.   

    HTMLDIALOG 如何使用,有例子吗?
      

  5.   

    VC提供了类CHtmlView,你可以以此类派生你的显示网页的类以下是我工程中的一段代码,希望对你有所帮助。/////////////////////////////////////////////////////////////////////////////
    // CDataHTMLView html view#ifndef __AFXEXT_H__
    #include <afxext.h>
    #endif
    #include <afxhtml.h>class CDataHTMLView : public CHtmlView
    {
    protected:
    DECLARE_DYNCREATE(CDataHTMLView)// html Data
    public:

    CDataHTMLView();           // protected constructor used by dynamic creation
    //{{AFX_DATA(CDataHTMLView)
    // NOTE: the ClassWizard will add data members here
    //}}AFX_DATA// Attributes
    public:// Operations
    public:// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CDataHTMLView)
    public:
    virtual void OnInitialUpdate();
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL// Implementation
    public:
    virtual ~CDataHTMLView();
    protected:#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
    #endif // Generated message map functions
    //{{AFX_MSG(CDataHTMLView)
    // NOTE - the ClassWizard will add and remove member functions here.
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
    };///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
    // Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_DATAHTMLVIEW_H__49999E9C_4F85_4B55_A014_EC8EE58AD170__INCLUDED_)
      

  6.   

    其实现部分代码void CDataHTMLView::OnInitialUpdate()
    {
         //显示网页本地c:\\mousenet\\node_in_dtd.xml,当然也可以显示远程的
         Navigate2(_T("c:\\mousenet\\node_in_dtd.xml"),NULL,NULL);
    }
      

  7.   

    代码名称:Embedding an HTML Help window into a dialog代码说明:在对话框中嵌入HTML帮助工具/平台:VC Win32http://www.vchelp.net/vchelp/archive.asp?type_id=5&class_id=1&cata_id=1&article_id=521
      

  8.   

    代码名称:Embedding an HTML Help window into a dialog代码说明:在对话框中嵌入HTML帮助工具/平台:VC Win32http://www.vchelp.net/vchelp/archive.asp?type_id=5&class_id=1&cata_id=1&article_id=521
      

  9.   

    不要HTMLView,他里面也是一个控件,MFC是很烂的东西
      

  10.   

    我的一点看法,首先生成一个ActivX控件,然后在他的OnDraw等要进行绘制的地方实现Html显示的功能就可以了。至于Html的相关功能可以借鉴htmlview等。
      

  11.   

    htmlview实际是的对话框,里面套个WebBrowser 控件,我不想这样,我要直接建立.Internet Explorer_Server
    大家可以用Spy看看。
      

  12.   

    http://blog.csdn.net/jiangsheng/archive/2004/07/06/35567.aspx
      

  13.   

    在看jiangsheng的blog中,他的那个里面很好