用mdi结构做ie浏览器为什么在窗口里点击连接后把ie自动调出来显示而不是新开个mdi窗口显示?请问如何做?谢谢 如题,请指点,谢谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 your view should be from CHtmlView,then overide CHtmlView::OnBeforeNavigate2add a view in tab,and show it... 请您说的详细点可以吗?最好代码举例,谢谢,我也知道用CHtmlView::OnBeforeNavigate2方法,可是如何捕捉点击的那个连接的地址呢?如何写这段代码阿? 考虑到当前MDI子窗体所使用的URL与新页面URL不同的特性,OnBeforeNavigate2函数的简单实现思路如下:示例程序中变量含义、用法请参见你的上一帖子http://expert.csdn.net/Expert/topic/2186/2186950.xml?temp=.5273554void CCMDIDemoHtmlViewView::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel) { // TODO: Add your specialized code here and/or call the base class if (theApp.m_strURL.CollateNoCase(lpszURL) ==0 ) { CHtmlView::OnBeforeNavigate2(lpszURL, nFlags, lpszTargetFrameName, baPostedData, lpszHeaders, pbCancel); } else { theApp.m_strURL= lpszURL; POSITION curTemplatePos = theApp.GetFirstDocTemplatePosition(); CDocTemplate* curTemplate = theApp.GetNextDocTemplate(curTemplatePos); curTemplate->OpenDocumentFile(NULL); }} 这个朋友,我用过了.不过好像不行阿.还是弹出ie,不是新的mdi窗口.如果可以有例子吗? * pbCancel = true;加上就可以了。多试试。 Visual C++中位图按钮的新颖设计 如何读写制定的XML文件 CListBox设置大小时,高度总不正常! static library中添加资源 如何把图片加载在界面上?高手指教。 我给大家弄了些电影!!!! smch(Ashes Of Time) 你的CD数据我已经收到,请进来签名领分了 我想用vc来调用dll,那应该怎么办? 诚征C/C++面试资料(题),如若分数不够,再加 在编写一个ActiveX控件中的全局函数,如何调用这个控件的InvalidateControl方法 wsaeventselect的问题 大家帮忙了(单文档视图的问题)
add a view in tab,and show it...
方法,可是如何捕捉点击的那个连接的地址呢?如何写这段代码阿?
示例程序中变量含义、用法请参见你的上一帖子
http://expert.csdn.net/Expert/topic/2186/2186950.xml?temp=.5273554void CCMDIDemoHtmlViewView::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel)
{
// TODO: Add your specialized code here and/or call the base class
if (theApp.m_strURL.CollateNoCase(lpszURL) ==0 )
{ CHtmlView::OnBeforeNavigate2(lpszURL, nFlags, lpszTargetFrameName, baPostedData, lpszHeaders, pbCancel);
}
else
{
theApp.m_strURL= lpszURL;
POSITION curTemplatePos = theApp.GetFirstDocTemplatePosition();
CDocTemplate* curTemplate = theApp.GetNextDocTemplate(curTemplatePos);
curTemplate->OpenDocumentFile(NULL);
}
}
加上就可以了。
多试试。