![]() |
![]() |
![]() |
![]() |
Designates an interface that applications can use to implement an instance of the Web browser control in an application. By implementing a Web browser control, an application can allows the user to browse sites on the Internet's World Wide Web, as well as objects in the Windows name space such as files, folders, disk drives, and locations on the network.
Methods in Vtable Order
IUnknown Methods | Description |
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IDispatch Methods | Description |
GetTypeInfoCount | Retrieves the number of type information interfaces that the Web browser control provides. |
GetTypeInfo | Retrieves a type information object, which can be used to get the type information for an interface. |
GetIDsOfNames | Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which may be used in subsequent calls to IDispatch::Invoke. |
Invoke | Provides access to properties and methods exposed by an object. |
IWebBrowser Methods | Description |
GoBack | Navigates to the previous item in the history list. |
GoForward | Navigates to the next item in the history list. |
GoHome | Navigates to the current home or start page. |
GoSearch | Navigates to the current search page. |
Navigate | Navigates to a resource identified by a Universal Resource Locator (URL) |
Refresh | Reloads the current file. |
Refresh2 | Reloads the current file and optionally prevents the pragma:noCache header from being sent. |
Stop | Stops opening a file. |
get_Application | Returns an Application object representing the application that contains the Web browser control. |
get_Parent | Returns the form on which the Web browser control is located. |
get_Container | Returns the container of the Web browser control, if any. |
get_Document | Returns the active document. |
get_TopLevelContainer | Returns a value indicating whether the current object is the top level container of the Web browser control. |
get_Type | Returns the type of the current contained object |
get_Left | Returns the distance between the internal left edge of the Web browser control and the left edge of its container. |
put_Left | Sets the distance between the internal left edge of the Web browser control and the left edge of its container. |
get_Top | Returns the distance between the internal top edge of the Web browser control and the top edge of its container. |
put_Top | Sets the distance between the internal top edge of the Web browser control and the top edge of its container. |
get_Width | Returns the horizontal dimension of the frame window that contains the Web browser control. |
put_Width | Sets the horizontal dimension of the frame window that contains the Web browser control. |
get_Height | Returns the vertical dimension of the frame window that contains the Web browser control. |
put_Height | Sets the vertical dimension of the frame window that contains the Web browser control. |
get_LocationName | Returns the name of the resource that the Web browser control or Internet Explorer is currently displaying. |
get_LocationURL | Returns the URL of the resource that the Web browser control or Internet Explorer is currently displaying. |
get_Busy | Returns a value indicating whether a download or other activity is still in progress. |
HRESULT GoBack(void);
Navigates backward one item in the history list.
See also IWebBrowser::GoForward, IWebBrowser::GoHome, IWebBrowser::GoSearch
HRESULT GoForward(void);
Navigates forward one item in the history list.
See also IWebBrowser::GoBack, IWebBrowser::GoHome, IWebBrowser::GoSearch
HRESULT GoHome(void);
Navigates to the current home or start page, as specified in the Internet Explorer Options dialog box and Internet Control Panel.
See also IWebBrowser::GoBack, IWebBrowser::GoForward, IWebBrowser::GoSearch
HRESULT GoSearch(void);
Navigates to the current search page, as specified in the Internet Explorer Options dialog box and Internet Control Panel.
See also IWebBrowser::GoBack, IWebBrowser::GoForward, IWebBrowser::GoHome
HRESULT IWebBrowser::Navigate( BSTR URL, // URL to navigate to VARIANT FAR* Flags, // address of option flags VARIANT FAR* TargetFrameName, // address of frame name for resource VARIANT FAR* PostData, // address of HTTP POST data VARIANT FAR* Headers, // address of HTTP headers );
Navigates to a resource identified by a Universal Resource Locator (URL), or to the file identified by a full path.
S_OK | The operation was successful. |
E_INVALIDARG | One or more parameters are invalid. |
E_OUTOFMEMORY | Out of memory. |
The post data specified by PostData is passed as a SAFEARRAY. 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.
See also DWebBrowserEvents::BeforeNavigate, DWebBrowserEvents::FrameBeforeNavigate, DWebBrowserEvents::FrameNavigateComplete, DWebBrowserEvents::NavigateComplete, IWebBrowser::Navigate
HRESULT Refresh(void);
Reloads the file that the Web browser control is currently displaying.
See also Refresh2
HRESULT Refresh( VARIANT FAR* Level // level of refresh to perform );
Reloads the file that the Web browser control is currently displaying. Unlike the IWebBrowser::Refresh function, this function contains a parameter that specifies the refresh level.
See also RefreshConstants
HRESULT Stop(void);
Cancels any pending navigation or download operation, and stops any dynamic page elements such as background sounds and animations.
See also DWebBrowserEvents::BeforeNavigate, DWebBrowserEvents::DownloadBegin, DWebBrowserEvents::FrameBeforeNavigate, DWebBrowserEvents::ProgressChange, IWebBrowser::Refresh
HRESULT get_Application( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves the automation object supported by the application that contains the Web browser control if the object is accessible; otherwise, this property returns the Web browser control's automation object.
S_OK | The operation was successful. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowser::get_Container, IWebBrowser::get_Document, IWebBrowser::get_Parent
HRESULT get_Busy( VARIANT_BOOL FAR* pBool // address of variable for busy flag );
Discovers whether the Web browser control is engaged in a navigation or downloading operation.
HRESULT get_Container( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves an object that evalutate to the container of the Web browser control, if any.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowser::get_Application, IWebBrowser::get_Document, IWebBrowser::get_Parent
HRESULT get_Document( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves the automation object of the active document, if any.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_INVALIDARG | One or more parameters are invalid. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowser::get_Application, IWebBrowser::get_Container, IWebBrowser::get_Parent
HRESULT get_Height( long FAR* pl // address of variable for height );
Retrieves the vertical dimension of the frame window that contains the Web browser control.
See also IWebBrowser::put_Height, IWebBrowser::get_Width
HRESULT put_Height( long Height // frame window height );
Sets the vertical dimension of the frame window that contains the Web browser control.
See also IWebBrowser::get_Height, IWebBrowser::put_Width
HRESULT get_Left( long FAR* pl // address of variable for left-edge distance );
Retrieves the distance between the internal left edge of the Web browser control and the left edge of its container.
See also IWebBrowser::get_Top, IWebBrowser::put_Left
HRESULT put_Left( long Left // left-edge distance );
Sets the distance between the internal left edge of the Web browser control and the left edge of its container.
See also IWebBrowser::get_Left, IWebBrowser::put_Top
HRESULT get_LocationName( BSTR FAR* pbstrLocationName // address of buffer for location name );
Retrieves the name of the resource that the Web browser control 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.
S_OK | The operation was successful. |
E_OUTOFMEMORY | Out of memory. |
See also IWebBrowser::get_LocationURL
HRESULT get_LocationURL( BSTR FAR* pbstrLocationURL // address of buffer for location URL );
Retrieves the URL of the resource that the Web browser control 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.
S_OK | The operation was successful. |
E_OUTOFMEMORY | Out of memory. |
See also IWebBrowser::get_LocationName
HRESULT get_Parent( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves a pointer to the IDispatch interface of the object that is the parent of the Web browser control.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowser::get_Application, IWebBrowser::get_Container, IWebBrowser::get_Document
HRESULT get_Top( long FAR* pl // address of variable for top-edge distance );
Retrieves the distance between the internal top edge of the Web browser control and the top edge of its container.
See also IWebBrowser::get_Left, IWebBrowser::put_Top
HRESULT put_Top( long Top // top-edge distance );
Sets the distance between the internal top edge of the Web browser control and the top edge of its container.
See also IWebBrowser::get_Top, IWebBrowser::put_Left
HRESULT get_TopLevelContainer( VARIANT_BOOL FAR* pBool) // address of variable for top-level flag
Determines if the container of the Web browser control is a top-level container.
S_OK | The operation was successful. |
E_INVALIDARG | Invalid parameter. |
HRESULT get_Type( BSTR FAR* pbstrType // address of buffer for type );
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. |
HRESULT get_Width( long FAR* pl // address of variable for width );
Retrieves the horizontal dimension of the frame window that contains the Web browser control.
See also IWebBrowser::get_Height, IWebBrowser::put_Width
HRESULT put_Width( long Width // frame window width );
Sets the horizontal dimension of the frame window that contains the Web browser control.
See also IWebBrowser::get_Width, IWebBrowser::put_Height
Designates an Automation interface that allows an application to control an instance of the Microsoft Internet Explorer application.
Methods in Vtable Order
IUnknown Methods | Description |
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IDispatch Methods | Description |
GetTypeInfoCount | Retrieves the number of type information interfaces that the Web browser control provides. |
GetTypeInfo | Retrieves a type information object, which can be used to get the type information for an interface. |
GetIDsOfNames | Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which may be used in subsequent calls to IDispatch::Invoke. |
Invoke | Provides access to properties and methods exposed by an object. |
IWebBrowserApp Methods | Description |
GoBack | Navigates to the previous item in the history list. |
GoForward | Navigates to the next item in the history list. |
GoHome | Navigates to the current home or start page. |
GoSearch | Navigates to the current search page. |
Navigate | Navigates to a resource identified by a Universal Resource Locator (URL) |
Refresh | Reloads the current file. |
Refresh2 | Reloads the current file and optionally prevents the pragma:noCache header from being sent. |
Stop | Stops opening a file. |
get_Application | Returns an Application object representing the application that contains the current instance of the Internet Explorer application. |
get_Parent | Returns the automation object supported by Internet Explorer. |
get_Container | Returns the container of the Web browser control. |
get_Document | Returns the active document. |
get_TopLevelContainer | Returns a value indicating whether the current object is the top level container of the Web browser control. |
get_Type | Returns the type of the current contained object |
get_Left | Returns the distance between the internal left edge of the Web browser control and the left edge of its container. |
put_Left | Sets the distance between the internal left edge of the Web browser control and the left edge of its container. |
get_Top | Returns the distance between the internal top edge of the Web browser control and the top edge of its container. |
put_Top | Sets the distance between the internal top edge of the Web browser control and the top edge of its container. |
get_Width | Returns the horizontal dimension of the frame window that contains the Web browser control. |
put_Width | Sets the horizontal dimension of the frame window that contains the Web browser control. |
get_Height | Returns the vertical dimension of the frame window that contains the Web browser control. |
put_Height | Sets the vertical dimension of the frame window that contains the Web browser control. |
get_LocationName | Returns the name of the resource that Internet Explorer is currently displaying. |
get_LocationURL | Returns the URL of the resource that Internet Explorer is currently displaying. |
get_Busy | Returns a value indicating whether a download or other activity is still in progress. |
Quit | Closes the Internet Explorer application. |
ClientToWindow | Converts the client coordinates of a point to window coordinates. |
PutProperty | Sets the value of a property associated with the given object. |
GetProperty | Retrieves the current value of a property associated with the given object. |
get_Name | Returns the name of the object that contains the Web browser control. |
get_HWND | Returns the window handle of Internet Explorer's main window. |
get_FullName | Returns the full pathname of the file that Internet Explorer is currently displaying. |
get_Path | Returns a string that evaluates to the full pathname of the resource that Internet Explorer is currently displaying. |
get_Visible | Returns a value indicating whether Internet Explorer is visible or hidden. |
put_Visible | Sets a value indicating whether Internet Explorer is visible or hidden. |
get_StatusBar | Returns a value that indicates whether the status bar is visible. |
put_StatusBar | Sets a value that determines whether the status bar is visible. |
get_StatusText | Returns the text of the status bar. |
put_StatusText | Sets the text for the status bar. |
get_ToolBar | Returns a value that indicates whether the toolbar is visible. |
put_ToolBar | Sets a value that determines whether the toolbar is visible. |
get_MenuBar | Returns a value that indicates whether the menu bar is visible. |
put_MenuBar | Sets a value that determines whether the menu bar is visible. |
get_FullScreen | Returns a value indicating whether Internet Explorer is in full screen or normal window mode. |
put_FullScreen | Sets a value that determines whether Internet Explorer is in full screen or normal window mode. |
HRESULT ClientToWindow( int FAR* pcx, // x-coordinate of point int FAR* pcy // y-coordinate of point );
Converts the client coordinates of a point to window coordinates. Client coordinates are relative to the upper-left corner of the client area; window coordinates are relative to the upper-left corner of a window.
HRESULT GetProperty( BSTR szProperty, // name of property to retrieve VARIANT FAR* pvtValue // address of variable for property value );
Retrieves the value of a property associated with the given object.
S_OK | The operation was successful. |
E_INVALIDARG | One or more parameters are invalid. |
See also IWebBrowserApp::PutProperty
HRESULT GoBack(void);
Navigates backward one item in the history list.
See also IWebBrowserApp::GoForward, IWebBrowserApp::GoHome, IWebBrowserApp::GoSearch
HRESULT GoForward(void);
Navigates forward one item in the history list.
See also IWebBrowserApp::GoBack, IWebBrowserApp::GoHome, IWebBrowserApp::GoSearch
HRESULT GoHome(void);
Navigates to the current home or start page, as specified in the Internet Explorer Options dialog box and Internet Control Panel.
See also IWebBrowserApp::GoBack, IWebBrowserApp::GoForward, IWebBrowserApp::GoSearch
HRESULT GoSearch(void);
Navigates to the current search page, as specified in the Internet Explorer Options dialog box and Internet Control Panel.
See also IWebBrowserApp::GoBack, IWebBrowserApp::GoForward, IWebBrowserApp::GoHome
HRESULT IWebBrowserApp::Navigate( BSTR URL, // URL to navigate to VARIANT FAR* Flags, // address of option flags VARIANT FAR* TargetFrameName, // address of frame name for resource VARIANT FAR* PostData, // address of HTTP POST data VARIANT FAR* Headers, // address of HTTP headers );
Navigates to a resource identified by a Universal Resource Locator (URL), or to the file identified by a full path.
S_OK | The operation was successful. |
E_INVALIDARG | One or more parameters are invalid. |
E_OUTOFMEMORY | Out of memory. |
The post data specified by PostData is passed as a SAFEARRAY. 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.
See also DWebBrowserEvents::BeforeNavigate, DWebBrowserEvents::FrameBeforeNavigate, DWebBrowserEvents::FrameNavigateComplete, DWebBrowserEvents::NavigateComplete
HRESULT PutProperty( BSTR szProperty, // name of property to set VARIANT vtValue // address of variable for property value );
Sets the value of a property associated with the given object.
S_OK | The operation was successful. |
E_INVALIDARG | One or more parameters are invalid. |
E_OUTOFMEMORY | Out of memory. |
See also IWebBrowserApp::GetProperty
HRESULT Quit(void);
Closes the Internet Explorer application.
HRESULT Refresh(void);
Reloads the file that Internet Explorer is currently displaying.
HRESULT Refresh( VARIANT FAR* Level // level of refresh to perform );
Reloads the file that Internet Explorer is currently displaying. Unlike the IWebBrowserApp::Refresh function, this function contains a parameter that specifies the refresh level.
See also RefreshConstants
HRESULT Stop(void);
Cancels any pending navigation or download operation, and stops any dynamic page elements such as background sounds and animations.
See also DWebBrowserEvents::BeforeNavigate, DWebBrowserEvents::DownloadBegin, DWebBrowserEvents::FrameBeforeNavigate, DWebBrowserEvents::ProgressChange, IWebBrowserApp::Quit, IWebBrowserApp::Refresh
HRESULT get_Application( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves the Automation interface supported by the Internet Explorer application.
S_OK | The operation was successful. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowserApp::get_Container, IWebBrowserApp::get_Document, IWebBrowserApp::get_Parent
HRESULT get_Busy( VARIANT_BOOL FAR* pBool // address of variable for busy flag );
Discovers whether Internet Explorer is engaged in a downloading operation or other activity.
HRESULT get_Container( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves a pointer to the IDispatch interface of the container.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowserApp::get_Application, IWebBrowserApp::get_Document, IWebBrowserApp::get_Parent
HRESULT get_Document( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves a pointer to the IDispatch interface of the active document object.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_INVALIDARG | One or more parameters are invalid. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowserApp::get_Application, IWebBrowserApp::get_Container, IWebBrowserApp::get_Parent
HRESULT get_FullName( BSTR FAR* pbstrFullName // address of buffer for pathname );
Retrieves the fully qualified pathname of the Internet Explorer executable file.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_OUTOFMEMORY | Out of memory. |
HRESULT get_FullScreen( VARIANT_BOOL FAR* pbFullScreen // address of variable for full-screen flag );
Determines if Internet Explorer is in 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.
See also IWebBrowserApp::put_FullScreen
HRESULT put_FullScreen( VARIANT_BOOL bFullScreen // full-screen flag );
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.
See also IWebBrowserApp::get_FullScreen
HRESULT get_Height( long FAR* pl // address of variable for height );
Retreives the height of Internet Explorer's main window.
See also IWebBrowserApp::get_Width, IWebBrowserApp::put_Height
HRESULT put_Height( long Height // height of main window );
Sets the height of Internet Explorer's main window.
See also IWebBrowserApp::get_Height, IWebBrowserApp::put_Width
HRESULT get_HWND( long FAR* pHWND // address of variable for window handle );
Retrieves the handle of Internet Explorer's main window.
HRESULT get_Left( long FAR* pl // address of variable for left-edge coordinate );
Retrieves the screen coordinate of the left edge of Internet Explorer's main window.
See also IWebBrowserApp::get_Top, IWebBrowserApp::put_Left
HRESULT put_Left( long Left // screen coordinate of left edge );
Sets the horizontal position of Internet Explorer's main window.
See also IWebBrowserApp::get_Left, IWebBrowserApp::put_Top
HRESULT get_LocationName( BSTR FAR* pbstrLocationName // address of buffer for location name );
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.
S_OK | The operation was successful. |
E_OUTOFMEMORY | Out of memory. |
See also IWebBrowserApp::get_LocationURL
HRESULT get_LocationURL( BSTR FAR* pbstrLocationURL // address of buffer for location URL );
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.
S_OK | The operation was successful. |
E_OUTOFMEMORY | Out of memory. |
See also IWebBrowserApp::get_LocationName
HRESULT get_MenuBar( VARIANT_BOOL FAR* Value // address of variable for visibility flag );
Returns a value that indicates whether Internet Explorer's menu bar is visible.
See also IWebBrowserApp::put_MenuBar
HRESULT put_MenuBar( VARIANT_BOOL Value // show flag );
Shows or hides Internet Explorer's menu bar.
See also IWebBrowserApp::get_MenuBar
HRESULT get_Name( BSTR FAR* pbstrName // address of buffer that receives the name );
Retrieves the name of the object that contains the Web browser control used by Internet Explorer.
S_OK | The operation was successful. |
E_OUTOFMEMORY | Out of memory. |
HRESULT get_Parent( IDispatch * FAR* ppDisp // address of variable for IDispatch pointer );
Retrieves a pointer to the IDispatch interface of the object that is the container of the Web browser control.
S_OK | The operation was successful. |
E_FAIL | The operation failed. |
E_NOINTERFACE | The interface is not supported. |
See also IWebBrowserApp::get_Application, IWebBrowserApp::get_Container, IWebBrowserApp::get_Document
HRESULT get_Path( BSTR FAR* pbstrPath // address of buffer for full path );
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. |
HRESULT get_StatusBar( VARIANT_BOOL FAR* pBool // address of variable for visibility flag );
Returns a value that indicates whether Internet Explorer's status bar is visible.
See also IWebBrowserApp::put_StatusBar
HRESULT put_StatusBar( VARIANT_BOOL Value // show flag );
Shows or hides Internet Explorer's status bar.
See also IWebBrowserApp::get_StatusBar
HRESULT get_StatusText( BSTR FAR* pbstr // address of buffer for text );
Retrieves the text of Internet Explorer's status bar.
See also IWebBrowserApp::put_StatusText
HRESULT put_StatusText( BSTR bstr // status bar text );
Sets the text of Internet Explorer's status bar.
See also IWebBrowserApp::get_StatusText
HRESULT get_ToolBar( int FAR* pValue // receives visibility flag );
Retrieves a value that indicates whether Internet Explorer's toolbar is visible.
See also IWebBrowserApp::put_ToolBar
HRESULT put_ToolBar( int Value // show flag );
Shows or hides Internet Explorer's toolbar.
See also IWebBrowserApp::get_ToolBar
HRESULT get_Top( long FAR* pl // address of variable for top-edge coordinate );
Retrieves the screen coordinate of the top edge of Internet Explorer's main window.
See also IWebBrowserApp::get_Left, IWebBrowserApp::put_Top
HRESULT put_Top( long Top // screen coordinate of top edge );
Sets the vertical position of Internet Explorer's main window.
See also IWebBrowserApp::get_Top, IWebBrowserApp::put_Left
HRESULT get_TopLevelContainer( VARIANT_BOOL FAR* pBool) // address of variable for top-level flag
Determines if Internet Explorer is the top-level container of the Web browser control.
HRESULT get_Type( BSTR FAR* pbstrType // address of buffer for type );
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. |
HRESULT get_Visible( VARIANT_BOOL FAR* pBool // address of variable for visibility flag );
Discovers whether Internet Explorer is visible or hidden.
See also IWebBrowserApp::put_Visible
HRESULT put_Visible( VARIANT_BOOL Value // visibility flag );
Sets the visibility state of Internet Explorer.
See also IWebBrowserApp::get_Visible
HRESULT get_Width( long FAR* pl // address of variable for width );
Retreives the width of Internet Explorer's main window.
See also IWebBrowserApp::get_Height, IWebBrowserApp::put_Width
HRESULT put_Width( long Width // width of main window );
Sets the width of Internet Explorer's main window.
See also IWebBrowserApp::get_Width, IWebBrowserApp::put_Height
Designates an event sink interface that an application must implement in order to receive event notifications from a Web browser control or from the Internet Explorer application.
Methods in Vtable Order
IUnknown Methods | Description |
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IDispatch Methods | Description |
GetTypeInfoCount | Retrieves the number of type information interfaces that the Web browser control provides. |
GetTypeInfo | Retrieves a type information object, which can be used to get the type information for an interface. |
GetIDsOfNames | Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which may be used in subsequent calls to IDispatch::Invoke. |
Invoke | Provides access to properties and methods exposed by an object. |
DWebBrowserEvents Methods | Description |
BeforeNavigate | Occurs when the Web browser control is about to navigate to a new URL. |
FrameBeforeNavigate | Occurs when the Web browser control is about to navigate to a new URL. This event is fired for navigations that occur inside an HTML frame. |
FrameNavigateComplete | Occurs after the browser has successfully navigated to a new location. This event is fired for navigations that occur inside an HTML frame. |
FrameNewWindow | Occurs when a new window is to be created for displaying a resource. This event is fired for navigations that occur inside an HTML frame. |
NavigateComplete | Occurs after the browser has successfully navigated to a new location. |
StatusTextChange | Occurs when the status bar text has changed. |
ProgressChange | Occurs when the progress of a download operation is updated. |
DownloadComplete | Occurs when a navigation operation finished, was halted, or failed. |
CommandStateChange | Occurs when the enabled state of a command changes. |
DownloadBegin | Occurs when a navigation operation is beginning, shortly after the BeforeNavigate event, unless the navigation is cancelled. |
NewWindow | Occurs when a new window is to be created for displaying a resource. |
TitleChange | Occurs when the title of a document in the Web browser control becomes available or changes. |
Quit | Occurs when the Internet Explorer application is ready to quit. |
PropertyChange | Occurs when the IWebBrowserApp::PutProperty function changes the value of a property. |
void BeforeNavigate( BSTR URL, // URL to navigate to long Flags, // option flags BSTR TargetFrameName, // name of frame for resource VARIANT FAR* PostData, // address of HTTP POST data BSTR Headers, // HTTP headers VARIANT_BOOL FAR* Cancel // cancel flag );
Notifies an application that Web browser control is about to navigate to a different URL, which may happen as a result of external automation, internal automation from a script, or the user clicking a link or typing in the address bar. The container has an opportunity to cancel the pending navigation.
The post data specified by PostData is passed as a SAFEARRAY. 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.
See also DWebBrowserEvents::FrameBeforeNavigate, DWebBrowserEvents::FrameNavigateComplete, DWebBrowserEvents::NavigateComplete, IWebBrowser::Navigate
void CommandStateChange( long Command, // command identifier VARIANT_BOOL Enable // enabled state );
Notifies an application that the enabled state of a Web browser command has changed.
void DownloadBegin(void);
Notifies an application that a navigation operation is beginning. This event is fired shortly after the BeforeNavigate event, unless the navigation is cancelled. Any animation or "busy" indication that the container needs to display should be connected to this event. a new page is about to be downloaded.
See also DWebBrowserEvents::DownloadComplete
void DownloadComplete(void);
Occurs when a navigation operation finished, was halted, or failed. Unlike NavigateComplete which is only fired 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.
See also DWebBrowserEvents::DownloadBegin
void FrameBeforeNavigate( BSTR URL, // URL to navigate to long Flags, // option flags BSTR TargetFrameName, // name of frame for resource VARIANT FAR* PostData, // address of HTTP POST data BSTR Headers, // HTTP headers VARIANT_BOOL FAR* Cancel // cancel flag );
Notifies an application that Web browser control is about to navigate to a different URL, which may happen as a result of external automation, internal automation from a script, or the user clicking a link or typing in the address bar. The container has an opportunity to cancel the pending navigation. This event is fired for navigations that occur inside an HTML frame.
The post data specified by PostData is passed as a SAFEARRAY. 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.
See also DWebBrowserEvents::FrameNavigateComplete, DWebBrowserEvents::NavigateComplete, IWebBrowser::Navigate
void FrameNavigateComplete( BSTR URL, // URL to navigate to );
Notifies an application that the browser has successfully navigated to a new location. The document may still be downloading (and in the case of HTML, images may still be downloading), but at least part of the document has been received from the server and the viewer for the document has been created. This event is fired for navigations that occur inside an HTML frame.
See also DWebBrowserEvents::FrameBeforeNavigate, IWebBrowser::Navigate
void FrameNewWindow( BSTR URL, // URL to navigate to long Flags, // option flags BSTR TargetFrameName, // name of frame for resource VARIANT FAR* PostData, // address of HTTP POST data BSTR Headers, // HTTP headers VARIANT_BOOL FAR* Processed // name of referring document );
Notifies an application that a new window is to be created for displaying a resource. Some actions that can cause this include the user shift-clicking on a link, the user right-clicking on a link and choosing "open in new window", or a targeted navigation to a frame name that does not yet exist. The container has an opportunity to handle the new window creation itself. If it does not, a top-level Internet Explorer window is created as a separate process. This event is fired for navigations that occur inside an HTML frame.
The preferred behavior of Web browser control containers is to process this event, create a new instance of the Web browser control, and pass all the parameters from the NewWindow event directly to the IWebBrowser::Navigate method on the newly created Web browser control. Another option for containers that cannot or do not need to create a new window is to degrade by performing the navigation in the existing window. To do this, they may process this event and then pass the parameters from this event to IWebBrowser::Navigate on the existing window.
The post data specified by PostData is passed as a SAFEARRAY. 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.
See also IWebBrowser::Navigate
void NavigateComplete( BSTR URL, // URL to navigate to );
Notifies an application that the browser has successfully navigated to a new location. The document may still be downloading (and in the case of HTML, images may still be downloading), but at least part of the document has been received from the server and the viewer for the document has been created.
See also DWebBrowserEvents::BeforeNavigate, IWebBrowser::Navigate
void NewWindow( BSTR URL, // URL to navigate to long Flags, // option flags BSTR TargetFrameName, // name of frame for resource VARIANT FAR* PostData, // address of HTTP POST data BSTR Headers, // HTTP headers VARIANT_BOOL FAR* Processed // name of referring document );
Notifies an application that a new window is to be created for displaying a resource. Some actions that can cause this include the user shift-clicking on a link, the user right-clicking on a link and choosing "open in new window", or a targeted navigation to a frame name that does not yet exist. The container has an opportunity to handle the new window creation itself. If it does not, a top-level Internet Explorer window is created as a separate process.
The preferred behavior of Web browser control containers is to process this event, create a new instance of the Web browser control, and pass all the parameters from the NewWindow event directly to the IWebBrowser::Navigate method on the newly created Web browser control. Another option for containers that cannot or do not need to create a new window is to degrade by performing the navigation in the existing window. To do this, they may process this event and then pass the parameters from this event to IWebBrowser::Navigate on the existing window.
The post data specified by PostData is passed as a SAFEARRAY. 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.
See also IWebBrowser::Navigate
void ProgressChange( long Progress, // amount of total progress long ProgressMax // maximum progress );
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 DWebBrowserEvents::DownloadBegin, DWebBrowserEvents::DownloadComplete
void PropertyChange( BSTR szProperty, // name of property that changed );
Notifies an application that the PutProperty function has changed the value of a property.
See also IWebBrowserApp::GetProperty, IWebBrowserApp::PutProperty
void Quit( VARIANT_BOOL FAR* Cancel // address of cancel flag );
Notifies an application that the Internet Explorer application is ready to quit.
void StatusTextChange( BSTR bstrText // new status bar text );
Notifies an application that the text of the status bar associated with the Web browser control has changed.
void TitleChange( BSTR Text // document title );
Notifies an application that the title of a document in the Web browser control becomes available or changes. For HTML, the title may change; while HTML is still downloading, the URL of the document is set as the title. After the real title (if there is one) is parsed from the HTML, the title is changed to reflect the actual title.
See also DWebBrowserEvents::CommandStateChange, DWebBrowserEvents::StatusTextChange
![]() |
![]() |
![]() |
![]() |