比较麻烦,
首先,你要找到对连接的HTTP文件在注册表中的信息,即将你的HTML文件的打开程序改为你的程序,就象TECENT的浏览器一样.
然后,你要修改你的程序,使之能处理命令行的参数.
首先,你要找到对连接的HTTP文件在注册表中的信息,即将你的HTML文件的打开程序改为你的程序,就象TECENT的浏览器一样.
然后,你要修改你的程序,使之能处理命令行的参数.
调试欢乐多
CHtmlView::OnNewWindow2
virtual void OnNewWindow2( LPDISPATCH* ppDisp, BOOL* Cancel );ParametersppDispA pointer to an interface pointer that, optionally, receives theIDispatch interface pointer of a new WebBrowser or Internet Explorer object. CancelA pointer to a cancel flag. An application can set this parameter to nonzero to cancel the navigation operation, or to zero to allow it to proceed.
void CYourView::OnNewWindow2(LPDISPATCH FAR* ppDisp,
BOOL FAR* Cancel)
{
// Get a pointer to the application object
CWinApp* pApp = AfxGetApp(); // Get the correct document template
CDocTemplate* pDocTemplate;
POSITION pos = pApp->GetFirstDocTemplatePosition();
pDocTemplate = pApp->GetNextDocTemplate(pos); ASSERT(pDocTemplate); // Create the new frame
CFrameWnd* pNewFrame = pDocTemplate->CreateNewFrame(GetDocument(),
(CFrameWnd*)AfxGetMainWnd());
ASSERT(pNewFrame); // Activate the frame and set its active view
pDocTemplate->InitialUpdateFrame(pNewFrame, NULL); CYourView* pWBVw = (CYourView*)pNewFrame->GetActiveView();
ASSERT(pWBVw); pWBVw->m_webBrowser.SetRegisterAsBrowser(TRUE); *ppDisp = pWBVw->m_webBrowser.GetApplication();
}