描述:
加载了一个webbrowser控件,想在网速慢或者断网的时候加载缓存中原有的网页,应当用什么函数,高手们指点了,谢过
解决方案1:
IWebBrowser2::Offline Property
--------------------------------------------------------------------------------
Sets or retrieves a VARIANT_BOOL value that indicates whether the object is currently operating in offline mode.
Syntax
HRESULT IWebBrowser2::get_Offline(VARIANT_BOOL *pbOffline);HRESULT IWebBrowser2::put_Offline(VARIANT_BOOL bOffline);
Parameters
pbOffline
Pointer to a variable of type VARIANT_BOOL that receives one of the values listed in Possible Values.
bOffline
VARIANT_BOOL that specifies one of the values listed in Possible Values.
Possible Values
VARIANT_TRUE The WebBrowser control is offline.
VARIANT_FALSE Default. The WebBrowser control is not offline.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
In offline mode, the browser is forced to read HTML pages from the local cache rather than from the source document.
您可能想查找下面的文章:
- IWebBrowser2::Navigate的问题
- IWebBrowser2::Navigate的问题
- 求救:两次添加同一个控件(Webbrowser控件),报告重定义,怎么办哦?
- 两次添加同一个控件(Webbrowser控件),报告重定义,怎么办哦?
- 调用WebBrowser->Navigator2,不产生DocumentComplete事件
- 请教IWebBrowser2问题~~~~~~~~~在线等
- 如何用IWebBrowser2判断当前窗口是否处于激活状态?
- 如何控制WebBrowser,并使其提交其中的网页或者操纵其中的文本框等?
- WebBrowser控件中怎么禁止js代码的执行?
- ATL下有没有包装过的(基础是IWebBrowser2)的浏览器控件可用?或者哪里有源代码可以下载?