如何传递html文件作为Web浏览器控件的输入 [英] how to pass html file as input for web browser control

查看:101
本文介绍了如何传递html文件作为Web浏览器控件的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将动态网页加载到MFC Web浏览器控件中,有没有办法做到这一点?



通常用于浏览器控制,参数variable.navigate是URL,但是我需要传递一个HTML页面作为控件的输入,这可能吗?

I wanted a dynamic webpage to be loaded into "MFC Web browser control", is there any way to do this ?

Normally for browser control, the parameter of variable.navigate is the URL, but I need to pass an HTML page as input for the control, is this possible?

推荐答案

你可以使用NavigateToString方法,这是一个例子:链接 [ ^ ]
You can use the NavigateToString method, here is an example : link[^]


这可能会有所帮助 [ ^ ]

查看他们引用IWebBrowser2 :: Navigate的部分。

而不是在编辑c中询问用户输入ontrol,你可以硬编码。
maybe this would help[^]
see the part where they refer to IWebBrowser2::Navigate.
Instead of asking for user input in edit control, you can hard-code it.


这篇关于如何传递html文件作为Web浏览器控件的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆