
HRESULT get_Left(
long FAR* pl
);
Retrieves the screen coordinate of the left edge of the Internet Explorer main window.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_Top, IWebBrowser2::put_Left
HRESULT get_LocationName(
BSTR FAR* pbstrLocationName
);
Retrieves the name of the resource that Internet Explorer is currently displaying.
If the resource is an HTML page on the World Wide Web, the name is the title of that page. If the resource is a folder or file on the network or local computer, the name is the UNC or full path of the folder or file.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_LocationURL
HRESULT get_LocationURL(
BSTR FAR* pbstrLocationURL
);
Retrieves the URL of the resource that Internet Explorer is currently displaying.
If the resource is a folder or file on the network or local computer, the name is the UNC or full path of the folder or file.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_LocationName
HRESULT get_MenuBar(
VARIANT_BOOL FAR* Value
);
Returns a value that indicates whether the Internet Explorer menu bar is visible.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::put_MenuBar
HRESULT get_Name(
BSTR FAR* pbstrName
);
Retrieves the name of the object that contains the WebBrowser control used by Internet Explorer.
Applies To
Internet Explorer
HRESULT get_Offline(
VARIANT_BOOL FAR* pbOffline
);
Returns a value indicating whether the WebBrowser control is currently operating in offline mode. In offline mode, the browser is forced to read HTML pages from the local cache rather than from the source document.
Applies To
WebBrowser, Internet Explorer
HRESULT get_Parent(
IDispatch * FAR* ppDisp
);
Retrieves a pointer to the IDispatch interface of the object that is the container of the WebBrowser control.
| S_OK | The operation was successful. |
| E_FAIL | The operation failed. |
| E_NOINTERFACE | The interface is not supported. |
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_Application, IWebBrowser2::get_Container, IWebBrowser2::get_Document
HRESULT get_Path(
BSTR FAR* pbstrPath
);
Retrieves the full path of the Internet Explorer application.
| S_OK | The operation was successful. |
| E_FAIL | The operation failed. |
| E_OUTOFMEMORY | Out of memory. |
Applies To
Internet Explorer
HRESULT get_ReadyState(
[retval, out] long *plReadyState
);
Retrieves the ready state of the object.
Applies To
WebBrowser, Internet Explorer
HRESULT get_RegisterAsBrowser(
VARIANT_BOOL FAR* pbRegister
);
Returns a value indicating whether the WebBrowser control is registered as a top-level browser for target name resolution.
Applies To
WebBrowser, Internet Explorer
HRESULT get_RegisterAsDropTarget(
VARIANT_BOOL FAR* pbRegister
);
Returns a value indicating whether the WebBrowser control is registered as a drop target for navigation.
Applies To
WebBrowser, Internet Explorer
HRESULT get_Resizable(
VARIANT_BOOL FAR* pValue
);
Retrieves the Internet Explorer object's resizable property.
Applies To
Internet Explorer
See also IWebBrowser2::put_Resizable
HRESULT get_Silent(
VARIANT_BOOL FAR* pbSilent
);
Returns a value indicating whether any dialog boxes can be shown.
Applies To
WebBrowser, Internet Explorer
HRESULT get_StatusBar(
VARIANT_BOOL FAR* pBool
);
Returns a value that indicates whether the Internet Explorer status bar is visible.
Applies To
Internet Explorer
See also IWebBrowser2::put_StatusBar
HRESULT get_StatusText(
BSTR FAR* pbstr
);
Retrieves the text of the Internet Explorer status bar.
Applies To
Internet Explorer
See also IWebBrowser2::put_StatusText
HRESULT get_TheaterMode(
VARIANT_BOOL FAR* pbTheaterMode
);
Retrieves a value indicating whether the WebBrowser control is in theater mode.
Applies To
WebBrowser, Internet Explorer
HRESULT get_ToolBar(
int FAR* pValue
);
Retrieves a value that indicates whether the Internet Explorer toolbar is visible.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::put_ToolBar
HRESULT get_Top(
long FAR* pl
);
Retrieves the screen coordinate of the top edge of the Internet Explorer main window.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_Left, IWebBrowser2::put_Top
HRESULT get_TopLevelContainer(
VARIANT_BOOL FAR* pBool
);
Determines if Internet Explorer is the top-level container of the WebBrowser control.
Applies To
WebBrowser, Internet Explorer
HRESULT get_Type(
BSTR FAR* pbstrType
);
Retrieves the type name of the contained document object.
| S_OK | The operation was successful. |
| E_FAIL | The operation failed. |
| E_OUTOFMEMORY | Out of memory. |
Applies To
WebBrowser, Internet Explorer
HRESULT get_Visible(
VARIANT_BOOL FAR* pBool
);
Determines whether the object is visible or hidden.
Applies To
Internet Explorer, WebBrowser
See also IWebBrowser2::put_Visible
HRESULT get_Width(
long FAR* pl
);
Retrieves the width of the Internet Explorer main window.
Applies To
Internet Explorer
See also IWebBrowser2::get_Height, IWebBrowser2::put_Width
HRESULT put_AddressBar(
VARIANT_BOOL FAR* pValue
);
Shows or hides the Internet Explorer object's address bar.
Applies To
Internet Explorer
See also IWebBrowser2::get_AddressBar
HRESULT put_FullScreen(
VARIANT_BOOL bFullScreen
);
Sets Internet Explorer to either full-screen or normal window mode.
In full-screen mode, the Internet Explorer main window is maximized and the status bar, toolbar, menu bar, and title bar are hidden.
The WebBrowser object ignores this property.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_FullScreen
HRESULT put_Height(
long Height
);
Sets the height of the Internet Explorer main window.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_Height, IWebBrowser2::put_Width
HRESULT put_Left(
long Left
);
Sets the horizontal position of the Internet Explorer main window.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_Left, IWebBrowser2::put_Top
HRESULT put_MenuBar(
VARIANT_BOOL Value
);
Shows or hides the Internet Explorer menu bar.
The WebBrowser object ignores this property.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_MenuBar
HRESULT put_Offline(
VARIANT_BOOL pbOffline
);
Sets a value indicating whether the WebBrowser control is currently operating in offline mode. In offline mode, the browser is forced to read HTML pages from the local cache rather than from the source document.
Applies To
WebBrowser, Internet Explorer
HRESULT put_RegisterAsBrowser(
VARIANT_BOOL bRegister
);
Sets a value indicating whether the WebBrowser control is registered as a top-level browser for target name resolution.
Applies To
WebBrowser, Internet Explorer
HRESULT put_RegisterAsDropTarget(
VARIANT_BOOL bRegister
);
Sets a value indicating whether the WebBrowser control is registered as a drop target for navigation.
Applies To
WebBrowser, Internet Explorer
HRESULT put_Resizable(
VARIANT_BOOL FAR* pValue
);
Sets the Internet Explorer object's resizable property.
Applies To
Internet Explorer
See also IWebBrowser2::get_Resizable
HRESULT put_Silent(
VARIANT_BOOL FAR* pbSilent
);
Sets a value indicating whether any dialog boxes can be shown.
Applies To
WebBrowser, Internet Explorer
HRESULT put_StatusBar(
VARIANT_BOOL Value
);
Shows or hides the Internet Explorer status bar.
The WebBrowser object ignores this property.
Applies To
Internet Explorer, WebBrowser
See also IWebBrowser2::get_StatusBar
HRESULT put_StatusText(
BSTR bstr
);
Sets the text of the Internet Explorer status bar.
The WebBrowser object ignores this property.
Applies To
Internet Explorer, WebBrowser
See also IWebBrowser2::get_StatusText
HRESULT put_TheaterMode(
VARIANT_BOOL bTheaterMode
);
Sets the TheaterMode property for the WebBrowser control.
The WebBrowser object ignores this property.
Applies To
WebBrowser, Internet Explorer
HRESULT put_ToolBar(
int Value
);
Shows or hides the Internet Explorer toolbar.
The WebBrowser object ignores this property.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_ToolBar
HRESULT put_Top(
long Top
);
Sets the vertical position of the Internet Explorer main window.
Applies To
WebBrowser, Internet Explorer
See also IWebBrowser2::get_Top, IWebBrowser2::put_Left
HRESULT put_Visible(
VARIANT_BOOL Value
);
Sets the visibility state of the object.
Applies To
Internet Explorer, WebBrowser
See also IWebBrowser2::get_Visible
HRESULT put_Width(
long Width
);
Sets the width of the Internet Explorer main window.
Applies To
Internet Explorer
See also IWebBrowser2::get_Width, IWebBrowser2::put_Height
This section describes the event methods exposed by the DWebBrowserEvents2 interface.
DWebBrowserEvents2 designates an event sink interface that an application must implement in order to receive event notifications from a WebBrowser control or from the Internet Explorer application.
Methods in Vtable Order
| DWebBrowserEvents2 methods | Description |
| StatusTextChange | Occurs when the status bar text has changed. |
| ProgressChange | Occurs when the progress of a download operation is updated. |
| CommandStateChange | Occurs when the enabled state of a command changes. |
| DownloadBegin | Occurs when a navigation operation is beginning, shortly after the BeforeNavigate2 event, unless the navigation is canceled. |
| DownloadComplete | Occurs when a navigation operation finishes, is halted, or fails. |
| TitleChange | Occurs when the title of a document in the WebBrowser control becomes available or changes. |
| PropertyChange | Occurs when the IWebBrowser2::PutProperty method changes the value of a property. |
| BeforeNavigate2 | Occurs when the WebBrowser control is about to navigate to a new URL. |
| NewWindow2 | Occurs when a new window is to be created for displaying a resource. |
| NavigateComplete2 | Occurs after the browser has successfully navigated to a new location. |
| DocumentComplete | Occurs when the document being navigated to is ready. |
| OnQuit | Occurs when the Internet Explorer application is ready to quit. |
| OnVisible | Occurs when the window for the WebBrowser should be shown/hidden. |
| OnToolBar | Occurs when the ToolBar property has changed. |
| OnMenuBar | Occurs when the MenuBar property has changed. |
| OnStatusBar | Occurs when the StatusBar property has changed. |
| OnFullScreen | Occurs when the FullScreen property has changed. |
| OnTheaterMode | Occurs when the TheaterMode property has changed. |
void BeforeNavigate2(
[in] IDispatch* pDisp,
[in] VARIANT* URL,
[in] VARIANT* Flags,
[in] VARIANT* TargetFrameName,
[in] VARIANT* PostData,
[in] VARIANT* Headers,
[out] VARIANT_BOOL* Cancel
);
Fires before a navigation occurs in the given WebBrowser (on either a window or frameset element).
The pDisp parameter is that of the top-level or frame WebBrowser object corresponding to the navigation. The processing of this navigation can be modified by setting the Cancel parameter to TRUE and either ignoring or reissuing a modified navigation method to the WebBrowser object. The URL parameter can be a PIDL in the case of a shell namespace entity for which there is no URL representation.
The post data specified by PostData is passed as a SAFEARRAY structure. The variant should be of type VT_ARRAY and point to a SAFEARRAY. The SAFEARRAY should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.
This event replaces the BeforeNavigate and FrameBeforeNavigate events, which should no longer be used. Internet Explorer 4.0 will continue to fire the BeforeNavigate and FrameBeforeNavigate events for compatibility with Internet Explorer 3.0.
Providing the pDisp pointer of the corresponding WebBrowser object gives the host better information and control over the Internet Explorer 3.0 specification, which used FrameBeforeNavigate and a target frame name to identify the target of navigation (target frame names are not unique).
Applies To
WebBrowser, Internet Explorer
See also DWebBrowserEvents2::NavigateComplete2, IWebBrowser2::Navigate2
void CommandStateChange(
[in] long Command,
[in] VARIANT_BOOL Enable
);
Notifies an application that the enabled state of a WebBrowser command has changed.
void DocumentComplete(
[in] IDispatch* pDisp,
[in] Variant * URL
);
Notifies an application that a document has reached the READYSTATE_COMPLETE state.
The URL parameter can be a PIDL in the case of a shell namespace entity for which there is no URL representation.
Not every frame will fire this event, but each frame that fires a DownloadBegin event will fire a corresponding DocumentComplete event.
Applies To
WebBrowser, Internet Explorer
See also READYSTATE
void DownloadBegin(void);
Notifies an application that a navigation operation is beginning.
This event is fired shortly after the BeforeNavigate2 event, unless the navigation is canceled. Any animation or "busy" indication that the container needs to display should be connected to this event.
Each DownloadBegin event will have a corresponding DownloadComplete event.
void DownloadComplete(void);
Occurs when a navigation operation finishes, is halted, or fails.
Unlike NavigateComplete2, which is fired only when a URL is successfully navigated to, this event is always fired after a navigation starts. Any animation or "busy" indication that the container needs to display should be connected to this event.
Each DownloadBegin event will have a corresponding DownloadComplete event.
See also DWebBrowserEvents2::DownloadBegin
void NavigateComplete2(
[in] IDispatch* pDisp,
[in] Variant * URL
);
Fires after a navigation to a hyperlink is completed (on either a window or frameset element).
The URL parameter can be a PIDL in the case of a shell namespace entity for which there is no URL representation.
This event replaces the NavigateComplete and FrameNavigateComplete events, which should no longer be used. Internet Explorer 4.0 continues to fire the NavigateComplete and FrameNavigateComplete events for compatibility with Internet Explorer 3.0.
Applies To
WebBrowser, Internet Explorer
void NewWindow2(
[out] IDispatch** ppDisp,
[out] VARIANT_BOOL * Cancel
);
Occurs when a new window is to be created for displaying a resource. This event precedes the creation of a new window from within the WebBrowser (for example, in response to a navigation targeted to a new window, or to a scripted window.open method).
The application processing this notification can respond in one of three ways:
Applies To
WebBrowser, Internet Explorer
void OnFullScreen(
[in] VARIANT_BOOL FullScreen
);
Occurs when the FullScreen property has changed.
Applies To
Internet Explorer
void OnMenuBar(
[in] VARIANT_BOOL MenuBar
);
Occurs when the MenuBar property is changed.
Applies To
Internet Explorer
void OnQuit(void);
Notifies an application that the Internet Explorer application is ready to quit.
Applies To
Internet Explorer
void OnStatusBar(
[in] VARIANT_BOOL StatusBar
);
Occurs when the StatusBar property is changed.
Applies To
Internet Explorer
void OnTheaterMode(
[in] VARIANT_BOOL TheaterMode
);
Occurs when the TheaterMode property is changed.
Applies To
Internet Explorer
void OnToolBar(
[in] VARIANT_BOOL ToolBar
);
Occurs when the ToolBar property is changed.
Applies To
Internet Explorer
void OnVisible(
[in] VARIANT_BOOL Visible
);
Occurs when the window for the WebBrowser should be shown/hidden. This allows the host window to behave the same way the Internet Explorer window would.
Applies To
WebBrowser, Internet Explorer
void ProgressChange(
[in] long Progress,
[in] long ProgressMax
);
Notifies an application that the progress of a download operation has been updated.
The container can use the information provided by this event to display the number of bytes downloaded so far or to update a progress indicator.
To calculate the percentage of progress to show in a progress indicator, multiply the value of Progress by 100 and divide by the value of ProgressMax (unless Progress is -1, in which case the container can indicate that the operation is finished or hide the progress indicator).
See also DWebBrowserEvents2::DownloadBegin, DWebBrowserEvents2::DownloadComplete
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.