IWebBrowser2::get_Left
Reference for C/C++ Developers

IWebBrowser2::get_Left


HRESULT get_Left(
    long FAR* pl
);

Retrieves the screen coordinate of the left edge of the Internet Explorer main window.

pl
Address of a variable that receives the screen coordinate of the main window's left edge.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_Top, IWebBrowser2::put_Left

IWebBrowser2::get_LocationName

HRESULT get_LocationName(
    BSTR FAR* pbstrLocationName
);

Retrieves the name of the resource that Internet Explorer is currently displaying.

pbstrLocationName
Address of a caller-allocated buffer that receives the name of the location.

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

IWebBrowser2::get_LocationURL

HRESULT get_LocationURL(
    BSTR FAR* pbstrLocationURL
);

Retrieves the URL of the resource that Internet Explorer is currently displaying.

pbstrLocationURL
Address of a caller-allocated buffer that receives the URL.

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

IWebBrowser2::get_MenuBar

HRESULT get_MenuBar(
    VARIANT_BOOL FAR* Value
);

Returns a value that indicates whether the Internet Explorer menu bar is visible.

Value
Address of a variable that receives TRUE if the menu bar is visible, or FALSE if it is not.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::put_MenuBar

IWebBrowser2::get_Name

HRESULT get_Name(
    BSTR FAR* pbstrName
);

Retrieves the name of the object that contains the WebBrowser control used by Internet Explorer.

pbstrName
Address of a caller-allocated buffer that receives the name of the object that contains the WebBrowser control.

Applies To

Internet Explorer

IWebBrowser2::get_Offline

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.

pbOffline
Address of a variable that receives TRUE if WebBrowser is offline, or FALSE if not.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_Parent

HRESULT get_Parent(
    IDispatch * FAR* ppDisp
);

Retrieves a pointer to the IDispatch interface of the object that is the container of the WebBrowser control.

ppDisp
Address of a variable that receives the pointer to the container's IDispatch interface.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_Application, IWebBrowser2::get_Container, IWebBrowser2::get_Document

IWebBrowser2::get_Path

HRESULT get_Path(
    BSTR FAR* pbstrPath
);

Retrieves the full path of the Internet Explorer application.

pbstrPath
Address of a caller-allocated buffer that receives the full path.

Applies To

Internet Explorer

IWebBrowser2::get_ReadyState

HRESULT get_ReadyState(
    [retval, out] long *plReadyState
);

Retrieves the ready state of the object.

plReadyState
Address of a long variable that receives the ReadyState property. This will be one of the READYSTATE values.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_RegisterAsBrowser

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.

pbRegister
Boolean expression that determines whether the object is registered as a top-level browser. If TRUE, the WebBrowser is registered as a top-level browser; if FALSE, it is not a top-level browser. The default value is FALSE.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_RegisterAsDropTarget

HRESULT get_RegisterAsDropTarget(
    VARIANT_BOOL FAR* pbRegister
);

Returns a value indicating whether the WebBrowser control is registered as a drop target for navigation.

pbRegister
Optional. A Boolean expression that determines whether the object is registered as a drop target for navigation. If TRUE, the object is registered as a drop target; if FALSE, it is not a drop target. The default value is FALSE.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_Resizable

HRESULT get_Resizable(
    VARIANT_BOOL FAR* pValue
);

Retrieves the Internet Explorer object's resizable property.

pValue
Address of a variable that receives a nonzero value if the object is resizable or zero if it is not resizable.

Applies To

Internet Explorer

See also IWebBrowser2::put_Resizable

IWebBrowser2::get_Silent

HRESULT get_Silent(
    VARIANT_BOOL FAR* pbSilent
);

Returns a value indicating whether any dialog boxes can be shown.

pbSilent
Optional. A Boolean expression that determines whether the WebBrowser can show any dialog boxes. If TRUE, dialog boxes will not be displayed; if FALSE, dialog boxes will be displayed. The default value is FALSE.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_StatusBar

HRESULT get_StatusBar(
    VARIANT_BOOL FAR* pBool
);

Returns a value that indicates whether the Internet Explorer status bar is visible.

pBool
Address of a variable that receives TRUE if the status bar is visible, or FALSE if it is not.

Applies To

Internet Explorer

See also IWebBrowser2::put_StatusBar

IWebBrowser2::get_StatusText

HRESULT get_StatusText(
    BSTR FAR* pbstr
);

Retrieves the text of the Internet Explorer status bar.

pbstr
Address of a caller-allocated buffer that receives the text of the status bar.

Applies To

Internet Explorer

See also IWebBrowser2::put_StatusText

IWebBrowser2::get_TheaterMode

HRESULT get_TheaterMode(
    VARIANT_BOOL FAR* pbTheaterMode
);

Retrieves a value indicating whether the WebBrowser control is in theater mode.

pbTheaterMode
Optional. A Boolean value that receives the TheaterMode property. If this value is nonzero, the WebBrowser is in theater mode. If this value is zero, the WebBrowser is not in theater mode. The default value is zero.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_ToolBar

HRESULT get_ToolBar(
    int FAR* pValue
);

Retrieves a value that indicates whether the Internet Explorer toolbar is visible.

pValue
Address of a variable that receives TRUE if the toolbar is visible, or FALSE if it is not.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::put_ToolBar

IWebBrowser2::get_Top

HRESULT get_Top(
    long FAR* pl
);

Retrieves the screen coordinate of the top edge of the Internet Explorer main window.

pl
Address of a variable that receives the screen coordinate of the main window's top edge.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_Left, IWebBrowser2::put_Top

IWebBrowser2::get_TopLevelContainer

HRESULT get_TopLevelContainer(
    VARIANT_BOOL FAR* pBool
);

Determines if Internet Explorer is the top-level container of the WebBrowser control.

pBool
Address of a variable that receives TRUE if the container is a top-level container, or FALSE otherwise.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_Type

HRESULT get_Type(
    BSTR FAR* pbstrType
);

Retrieves the type name of the contained document object.

pbstrType
Address of a caller-allocated buffer that receives the type name.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::get_Visible

HRESULT get_Visible(
    VARIANT_BOOL FAR* pBool
);

Determines whether the object is visible or hidden.

pBool
Address of a variable that receives TRUE if the object is visible, or FALSE if it is hidden.

Applies To

Internet Explorer, WebBrowser

See also IWebBrowser2::put_Visible

IWebBrowser2::get_Width

HRESULT get_Width(
    long FAR* pl
);

Retrieves the width of the Internet Explorer main window.

pl
Address of a variable that receives the width, in pixels, of the main window.

Applies To

Internet Explorer

See also IWebBrowser2::get_Height, IWebBrowser2::put_Width

IWebBrowser2::put_AddressBar

HRESULT put_AddressBar(
    VARIANT_BOOL FAR* pValue
);

Shows or hides the Internet Explorer object's address bar.

pValue
Address of a variable that contains a nonzero value if the address bar is to be shown, or zero if it is to be hidden.

Applies To

Internet Explorer

See also IWebBrowser2::get_AddressBar

IWebBrowser2::put_FullScreen

HRESULT put_FullScreen(
    VARIANT_BOOL bFullScreen
);

Sets Internet Explorer to either full-screen or normal window mode.

bFullScreen
Full-screen flag. If this parameter is TRUE, Internet Explorer is set to full-screen mode; if FALSE, it is set to 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

IWebBrowser2::put_Height

HRESULT put_Height(
    long Height
);

Sets the height of the Internet Explorer main window.

Height
Height, in pixels, of the main window.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_Height, IWebBrowser2::put_Width

IWebBrowser2::put_Left

HRESULT put_Left(
    long Left
);

Sets the horizontal position of the Internet Explorer main window.

Left
Screen coordinate of the left edge of the main window.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_Left, IWebBrowser2::put_Top

IWebBrowser2::put_MenuBar

HRESULT put_MenuBar(
    VARIANT_BOOL Value
);

Shows or hides the Internet Explorer menu bar.

Value
Show flag. A value of TRUE shows the menu bar; a value of FALSE hides it.

The WebBrowser object ignores this property.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_MenuBar

IWebBrowser2::put_Offline

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.

pbOffline
Address of a variable that receives the Offline flag. If this parameter is True, the WebBrowser control is reading from the local cache. If this parameter is False, the control will attempt to read from the source document.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::put_RegisterAsBrowser

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.

bRegister
Boolean expression that determines whether Internet Explorer is registered as a top-level browser. If TRUE, the WebBrowser is registered as a top-level browser; if FALSE, it is not a top-level browser. The default value is FALSE.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::put_RegisterAsDropTarget

HRESULT put_RegisterAsDropTarget(
    VARIANT_BOOL bRegister
);

Sets a value indicating whether the WebBrowser control is registered as a drop target for navigation.

bRegister
Optional. A Boolean expression that determines if the object is registered as a drop target for navigation. If TRUE, the object is registered as a drop target; if FALSE, it is not a drop target. The default value is FALSE.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::put_Resizable

HRESULT put_Resizable(
    VARIANT_BOOL FAR* pValue
);

Sets the Internet Explorer object's resizable property.

pValue
Address of a variable that contains a nonzero value if the object is resizable, or zero if it is not resizable.

Applies To

Internet Explorer

See also IWebBrowser2::get_Resizable

IWebBrowser2::put_Silent

HRESULT put_Silent(
    VARIANT_BOOL FAR* pbSilent
);

Sets a value indicating whether any dialog boxes can be shown.

pbSilent
Optional. A Boolean expression that determines whether the object can show any dialog boxes. If TRUE, dialog boxes will not be displayed; if FALSE, dialog boxes will be displayed. The default value is FALSE.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::put_StatusBar

HRESULT put_StatusBar(
    VARIANT_BOOL Value
);

Shows or hides the Internet Explorer status bar.

Value
Show flag. A value of TRUE shows the status bar; a value of FALSE hides it.

The WebBrowser object ignores this property.

Applies To

Internet Explorer, WebBrowser

See also IWebBrowser2::get_StatusBar

IWebBrowser2::put_StatusText

HRESULT put_StatusText(
    BSTR bstr
);

Sets the text of the Internet Explorer status bar.

bstr
Status bar text.

The WebBrowser object ignores this property.

Applies To

Internet Explorer, WebBrowser

See also IWebBrowser2::get_StatusText

IWebBrowser2::put_TheaterMode

HRESULT put_TheaterMode(
    VARIANT_BOOL bTheaterMode
);

Sets the TheaterMode property for the WebBrowser control.

bTheaterMode
Optional. A Boolean value that contains the TheaterMode property. If this value is nonzero, the WebBrowser changes to theater mode. If this value is zero, the WebBrowser is taken out of theater mode. The default value is zero.

The WebBrowser object ignores this property.

Applies To

WebBrowser, Internet Explorer

IWebBrowser2::put_ToolBar

HRESULT put_ToolBar(
    int Value
);

Shows or hides the Internet Explorer toolbar.

Value
Show flag. A value of TRUE shows the toolbar; a value of FALSE hides it.

The WebBrowser object ignores this property.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_ToolBar

IWebBrowser2::put_Top

HRESULT put_Top(
    long Top
);

Sets the vertical position of the Internet Explorer main window.

Top
Screen coordinate of the top edge of the main window.

Applies To

WebBrowser, Internet Explorer

See also IWebBrowser2::get_Top, IWebBrowser2::put_Left

IWebBrowser2::put_Visible

HRESULT put_Visible(
    VARIANT_BOOL Value
);

Sets the visibility state of the object.

Value
Visibility flag. If this parameter is TRUE, the object is visible; if FALSE, it is hidden.

Applies To

Internet Explorer, WebBrowser

See also IWebBrowser2::get_Visible

IWebBrowser2::put_Width

HRESULT put_Width(
    long Width
);

Sets the width of the Internet Explorer main window.

Width
Width, in pixels, of the main window.

Applies To

Internet Explorer

See also IWebBrowser2::get_Width, IWebBrowser2::put_Height

Events

This section describes the event methods exposed by the DWebBrowserEvents2 interface.

DWebBrowserEvents2

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.

DWebBrowserEvents2::BeforeNavigate2

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).

pDisp
Address of the frame's IDispatch interface.
URL
URL to be navigated to.
Flags
Reserved for future use.
TargetFrameName
String that contains the name of the frame in which to display the resource, or NULL if no named frame is targeted for the resource.
PostData
Address of data to send to the server if the HTTP POST transaction is being used.
Headers
Additional HTTP headers to send to the server (HTTP URLs only). The headers can specify things like the action required of the server, the type of data being passed to the server, or a status code.
Cancel
Address of a cancel flag. An application can set this parameter to TRUE to cancel the navigation operation, or to FALSE to allow it to proceed.

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

DWebBrowserEvents2::CommandStateChange

void CommandStateChange(
    [in] long Command,
    [in] VARIANT_BOOL Enable
);

Notifies an application that the enabled state of a WebBrowser command has changed.

Command
Identifier of the command whose enabled state has changed.
Enable
Enabled state. This parameter is TRUE if the command is enabled, or FALSE if it is disabled.

DWebBrowserEvents2::DocumentComplete

void DocumentComplete(
    [in] IDispatch* pDisp,
    [in] Variant * URL
);

Notifies an application that a document has reached the READYSTATE_COMPLETE state.

pDisp
Address of the frame's IDispatch interface. In the case of a document that contains multiple frames, each frame will fire this event. The top-level frame will fire this event after each subframe is completed.
URL
String expression that evaluates to the URL, UNC file name, or PIDL that was navigated to. Note that this URL can be different from the URL that the browser was told to navigate to. One reason is that this URL is the canonicalized and qualified URL; for example, if an application specified a URL of "www.microsoft.com" in a call to the Navigate or Navigate2 method, the URL passed by DocumentComplete would be "http://www.microsoft.com/". Also, if the server has redirected the browser to a different URL, the redirected URL will be reflected here.

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

DWebBrowserEvents2::DownloadBegin

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.

DWebBrowserEvents2::DownloadComplete

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

DWebBrowserEvents2::NavigateComplete2

void NavigateComplete2(
    [in] IDispatch* pDisp,
    [in] Variant * URL
);

Fires after a navigation to a hyperlink is completed (on either a window or frameset element).

pDisp
Address of the frame's IDispatch interface.
URL
String expression that evaluates to the URL, UNC file name, or PIDL that was navigated to. Note that this URL can be different from the URL that the browser was told to navigate to. One reason is that this URL is the canonicalized and qualified URL; for example, if an application specified a URL of "www.microsoft.com" in a call to the Navigate or Navigate2 method, the URL passed by NavigateComplete2 would be "http://www.microsoft.com/". Also, if the server has redirected the browser to a different URL, the redirected URL will be reflected here.

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

DWebBrowserEvents2::NewWindow2

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).

ppDisp
Address of an interface pointer that, optionally, receives the IDispatch interface pointer of a new WebBrowser or InternetExplorer object.
Cancel
Address of a cancel flag. An application can set this parameter to TRUE to cancel the navigation operation, or to FALSE to allow it to proceed.

The application processing this notification can respond in one of three ways:

  1. Create a new, hidden, non-navigated WebBrowser or InternetExplorer object that is returned in ppDisp. Upon return from this event, the object that fired this event will then configure and navigate (including a BeforeNavigate2 event) the new object to the target location.
  2. Cancel the new window creation by setting Cancel to TRUE. No object is created and the navigation is attempted on the current window (with an accompanying BeforeNavigate2 event).
  3. Do nothing and do not set ppDisp to any value. This will cause the object that fired the event to create a new InternetExplorer object to handle the navigation.

Applies To

WebBrowser, Internet Explorer

DWebBrowserEvents2::OnFullScreen

void OnFullScreen(
    [in] VARIANT_BOOL FullScreen
);

Occurs when the FullScreen property has changed.

FullScreen
Nonzero if Internet Explorer is in full-screen mode, or zero otherwise.

Applies To

Internet Explorer

DWebBrowserEvents2::OnMenuBar

void OnMenuBar(
    [in] VARIANT_BOOL MenuBar
);

Occurs when the MenuBar property is changed.

MenuBar
Nonzero if Internet Explorer's menu bar is visible, or zero otherwise.

Applies To

Internet Explorer

DWebBrowserEvents2::OnQuit

void OnQuit(void);

Notifies an application that the Internet Explorer application is ready to quit.

Applies To

Internet Explorer

DWebBrowserEvents2::OnStatusBar

void OnStatusBar(
    [in] VARIANT_BOOL StatusBar
);

Occurs when the StatusBar property is changed.

StatusBar
Nonzero if Internet Explorer's status bar is visible, or zero otherwise.

Applies To

Internet Explorer

DWebBrowserEvents2::OnTheaterMode

void OnTheaterMode(
    [in] VARIANT_BOOL TheaterMode
);

Occurs when the TheaterMode property is changed.

TheaterMode
Nonzero if Internet Explorer is in theater mode, or zero otherwise.

Applies To

Internet Explorer

DWebBrowserEvents2::OnToolBar

void OnToolBar(
    [in] VARIANT_BOOL ToolBar
);

Occurs when the ToolBar property is changed.

ToolBar
Nonzero if Internet Explorer's toolbar is visible, or zero otherwise.

Applies To

Internet Explorer

DWebBrowserEvents2::OnVisible

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.

Visible
Nonzero if the object is visible, or zero otherwise.

Applies To

WebBrowser, Internet Explorer

DWebBrowserEvents2::ProgressChange

void ProgressChange(
    [in] long Progress,
    [in] long ProgressMax
);

Notifies an application that the progress of a download operation has been updated.

Progress
Amount of total progress to show, or -1 when progress is complete.
ProgressMax
Maximum progress value.

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.