比如说在单文档里显示新浪网,最好有示例代码,在线等

解决方案 »

  1.   

    you can use CHtmlView in sdi
    msdn.microsoft.com/library/ en-us/vclib/html/vcrefCHtmlView.asp
      

  2.   

    void CSimpleBrowserView::OnInitialUpdate()
    {
    CHtmlView::OnInitialUpdate(); Navigate2(_T("http://www.sina.com.cn/"),
    NULL,NULL);
    }/////////////////////////////////////////////////////////////////////////////
    // CSimpleBrowserView diagnostics#ifdef _DEBUG
    void CSimpleBrowserView::AssertValid() const
    {
    CHtmlView::AssertValid();
    }void CSimpleBrowserView::Dump(CDumpContext& dc) const
    {
    CHtmlView::Dump(dc);
    }CSimpleBrowserDoc* CSimpleBrowserView::GetDocument() // non-debug version is inline
    {
    ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSimpleBrowserDoc)));
    return (CSimpleBrowserDoc*)m_pDocument;
    }
    #endif //_DEBUG/////////////////////////////////////////////////////////////////////////////
    // CSimpleBrowserView message handlersvoid CSimpleBrowserView::OnNavigateBack() 
    { // Call the CHtmlView function
    // that goes to the previous
    // URL.
    GoBack();}void CSimpleBrowserView::OnNavigateForward() 
    { // Call the CHtmlView function
    // that goes to the next URL.
    GoForward();}void CSimpleBrowserView::OnNavigateGoto() 
    {
    CNewURL NewURL; // Put up a dialog box that asks
    // user for a URL.
    if( NewURL.DoModal() == IDOK ) // If the click on the OK button,
    // go to the new URL.
    Navigate2( NewURL.m_strNewURL,
    0, 0, 0 );}void CSimpleBrowserView::OnNavigateHome() 
    { // Call the CHtmlView function
    // that goes to the home page.
    GoHome();}void CSimpleBrowserView::OnNavigateSearch() 
    { // Call the CHtmlView function
    // that goes to the search page.
    GoSearch();}void CSimpleBrowserView::OnNavigateStop() 
    { // Call the CHtmlView function
    // that stops the transfer.
    Stop();}