基于对话框的, 很简单定制的ie浏览器, 如何阻止某些网页弹出容器?

解决方案 »

  1.   

    DWebBrowserEvents2::NewWindow2 Event
      

  2.   

    定义一个全局变量BOOL m_bPop,在BOOL CBlogAdsDlg::OnInitDialog()中初始化为FALSE
    void CBlogAdsDlg::OnDownloadBeginExplorer2() 
    {
    // TODO: Add your control notification handler code here
    m_bPop=FALSE;//////阻止弹出窗口变量
    }void CBlogAdsDlg::OnDownloadCompleteExplorer2() 
    {
    // TODO: Add your control notification handler code here
    m_bPop=TRUE;//////阻止弹出窗口变量
    }void CBlogAdsDlg::OnNewWindow2Explorer2(LPDISPATCH FAR* ppDisp, BOOL FAR* Cancel) 
    {
    // TODO: Add your control notification handler code here
    *Cancel=m_bPop;//////阻止弹出窗口变量
    }