描述
当文档已完全加载并初始化时引发火灾.
语法
SUB DocumentComplete ( _ BYVAL hwndContainer AS HWND, _ BYVAL pDisp AS IDispatch PTR, _ BYVAL vURL AS VARIANT PTR _ ) |
参数
hwndContainer |
[in]处理的OLE容器窗口. |
pDisp |
[in]指向IDispatch界面的窗口或框架中,文档已加载.这IDispatch界面可以查询的IWebBrowser2接口. |
vURL |
[in]类型的指针VT_BSTR指定URL,通用命名约定(UNC)文件名的一个变种,或指向一个项目标识符列表(PIDL)所加载的文件. |
返回值
无返回值.
DISPID 事件
DISPID_DOCUMENTCOMPLETE
此事件的DISPID定义在exdispid.inc.使用此值来确定事件处理程序时,执行IDispatch.Invoke.
备注
vURL参数的值可能不匹配的URL最初给WebBrowser控件.一个可能的原因是,URL可能被转换为一个合格的形式.例如,如果一个应用程序指定的下一个URL IWebBrowser2接口的Navigate或Navigate2方法,然后URL进入DocumentComplete是http:/ / www.microsoft.com.COM /.此外,如果服务器重定向浏览器到一个不同的URL,重定向URL传递到URL参数.
的WebBrowser控件火灾的DocumentComplete事件当文件完全加载和READYSTATE属性改为READYSTATE_COMPLETE.这里有一些关于这个事件的触发点.
· | In pages with no frames, this event fires once after loading is complete. |
· | In pages where multiple frames are loaded, this event fires for each frame where the DownloadBegin event has fired. |
· | This event's pDisp parameter is the same as the IDispatch interface pointer of the frame in which this event fires. |
· | In the loading process, the highest level frame (which is not necessarily the top-level frame) fires the final DocumentComplete event. At this time, the pDisp parameter will be the same as the IDispatch interface pointer of the highest level frame. |
目前,该DocumentComplete不火时的WebBrowser Control的Visible属性设置为false.
引用文件
CWebBrowserEventsImpl.inc