国庆节前最后一个送分题,简单~~~~~

1982pc 2007-09-29 04:59:08
问题是这样,我现在想在我的MFC工程里嵌入显示网页,也找到一个ActiveX Control控件,MFC自动封装了一个CExplorer1类,在这个类成员里呢有一个 Navigate方法,Navigate(_T("www.163.com"),NULL,NULL,NULL,NULL);这样就可以访问网页了,但是我只要随便点击网页里一个连接,就会调用我的外部浏览器,就是IE,而不是在本控件内显示,要怎么做才能让他不调用外部浏览器,而是在我的控件里显示呢?

以前没用过这个东西,确实有很多不明白的地方,网上有不怎么找的到资料.各位大虾帮帮忙,有资料也给分,或者用其他控件显示达到我要的效果也给分!!!!!
...全文
243 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
1982pc 2007-10-09
  • 打赏
  • 举报
回复
acinonyx

如果要在同一个窗口:
*ppDisp = m_browser.GetApplication();

//什么意思呀,这个返回指针怎么用呢?!
1982pc 2007-09-30
  • 打赏
  • 举报
回复
个人顶起~~~~~
1982pc 2007-09-29
  • 打赏
  • 举报
回复
TargetFrameName
[in] Pointer to a string that contains the name of the frame in which to display the resource. The possible values for this parameter are:
_BLANK
Load the link into a new unnamed window.
_PARENT
Load the link into the immediate parent of the document the link is in.
_SELF
Load the link into the same window the link was clicked in.
_TOP
Load the link into the full body of the current window.
<WINDOW_NAME >
A named HTML frame. If no frame or window exists that matches the specified target name, a new window is opened for the specified link.



===========================
参数都试了,不行呀.谁来看看呀.
1982pc 2007-09-29
  • 打赏
  • 举报
回复
回 alfwolf


_BLANK 这些是宏么?



我怎么找不到呢?


有例子么?给一个,谢谢
acinonyx 2007-09-29
  • 打赏
  • 举报
回复
如果要在同一个窗口:
*ppDisp = m_browser.GetApplication();
acinonyx 2007-09-29
  • 打赏
  • 举报
回复
在NewWindow2事件里添加以下代码:
CIeframeDlg *m_dlgNewWB = new CIeframeDlg;
m_dlgNewWB->Create(IDD_IEFRAME_DIALOG);
m_dlgNewWB->m_browser.SetRegisterAsBrowser(TRUE);
*ppDisp = m_dlgNewWB->m_browser.GetApplication();
alfwolf 2007-09-29
  • 打赏
  • 举报
回复
HRESULT Navigate( BSTR url,
VARIANT *Flags,
VARIANT *TargetFrameName,
VARIANT *PostData,
VARIANT *Headers
);

TargetFrameName
[in] Pointer to a string that contains the name of the frame in which to display the resource. The possible values for this parameter are:
_BLANK
Load the link into a new unnamed window.
_PARENT
Load the link into the immediate parent of the document the link is in.
_SELF
Load the link into the same window the link was clicked in.
_TOP
Load the link into the full body of the current window.
<WINDOW_NAME>
A named HTML frame. If no frame or window exists that matches the specified target name, a new window is opened for the specified link.

18,363

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧