void CMyHtmlView::OnDocumentComplete(LPDISPATCH pDisp, LPCTSTR lpszUrl)
{
// make sure the main frame has the new URL. This call also stops the animation
((CChildFrame*)GetParentFrame())->SetAddress(lpszUrl);
CString strURL(lpszUrl);
/*
if(strURL.Find("custom.asp")>0){*/
CComQIPtr<IWebBrowser2> pWebBrowser2(pDisp);
CHTMLCodeDlg HTMLCodeDlg;
if(pWebBrowser2){
CComQIPtr<IDispatch> pqiDisp;
pWebBrowser2->get_Document(&pqiDisp);
HTMLCodeDlg.m_pdocument=pqiDisp;
}
HTMLCodeDlg.DoModal();
//}
}