到我的主页 http://263.csdn.net/edyang/ 下载 HTMLDoc 例子,应该对你有所启发。

解决方案 »

  1.   

    下面的代码实现了IE里有的“查看源文件”的功能void cmybrowser::onviewsource() 
    {
    cwnd* pwnd = null;  cwnd* pwndshell = m_webbrowser2.getwindow(gw_child); // get the webbrowser window pointer if (pwndshell) 

    pwnd = pwndshell->getwindow(gw_child);  //get the child window pointer


    if(pwnd != null) 

    wparam wparam = makelong(idm_viewsource, 1);  //convert to unsigned 32 bit value and pass it to wparam
    pwnd->sendmessage(wm_command, wparam, (lparam)pwndhtml->m_hwnd); //cool send a message to retreive the source.

    }
      

  2.   

    //bow edyang & bensilver