DWebBrowserEvents2::PropertyChange
Reference for C/C++ Developers

DWebBrowserEvents2::PropertyChange


void PropertyChange(
    BSTR szProperty,
);

Notifies an application that the PutProperty method has changed the value of a property.

szProperty
Caller-allocated buffer that contains the name of the property.

See also IWebBrowser2::GetProperty, IWebBrowser2::PutProperty

DWebBrowserEvents2::StatusTextChange

void StatusTextChange(
    [in] BSTR bstrText
);

Notifies an application that the text of the status bar associated with the WebBrowser control has changed.

bstrText
String that contains the new status bar text.

DWebBrowserEvents2::TitleChange

void TitleChange(
    [in] BSTR Text
);

Notifies an application if the title of a document in the WebBrowser control becomes available or changes.

Text
Caller-allocated buffer that contains the new document title.

Because the title might change while an HTML page is downloading, the URL of the document is set as the title. After the title specified in the HTML page, if there is one, is parsed, the title is changed to reflect the actual title.

See also DWebBrowserEvents2::CommandStateChange, DWebBrowserEvents2::StatusTextChange

Enumerations

This section defines enumerations used with the WebBrowser interfaces.

BrowserNavConstants

typedef enum BrowserNavConstants {
    navOpenInNewWindow = 0x1,
    navNoHistory       = 0x2,
    navNoReadFromCache = 0x4,
    navNoWriteToCache  = 0x8
    navAllowAutosearch = 0x10,
    navBrowserBar      = 0x20
} BrowserNavConstants;

Contains values used by the IWebBrowser2::Navigate and IWebBrowser2::Navigate2 methods.

Values
navOpenInNewWindow Open the resource or file in a new window.
navNoHistory Do not add the resource or file to the history list. The new page replaces the current page in the list.
navNoReadFromCache Not used.
navNoWriteToCache Not used.
navAllowAutosearch If the navigation fails, the autosearch functionality will attempt to navigate common root domains (.com, .edu, and so on). If this still fails, the URL will be passed to a search engine.
navBrowserBar Causes the current Explorer Bar to navigate to the given item, if possible.

See also DWebBrowserEvents2::BeforeNavigate2, DWebBrowserEvents2::NavigateComplete2, DWebBrowserEvents2::NewWindow2

CommandStateChangeConstants

typedef enum CommandStateChangeConstants {
    CSC_UPDATECOMMANDS = 0xFFFFFFFF,
    CSC_NAVIGATEFORWARD = 0x00000001,
    CSC_NAVIGATEBACK = 0x00000002
} CommandStateChangeConstants;

Contains values used by the DWebBrowserEvents2::CommandStateChange event.

Values
CSC_UPDATECOMMANDS The enabled state of a toolbar button might have changed.
CSC_NAVIGATEFORWARD The enabled state of the Forward button has changed.
CSC_NAVIGATEBACK The enabled state of the Back button has changed.

READYSTATE

typedef enum tagREADYSTATE{
    READYSTATE_UNINITIALIZED = 0,
    READYSTATE_LOADING = 1,
    READYSTATE_LOADED = 2,
    READYSTATE_INTERACTIVE = 3,
    READYSTATE_COMPLETE = 4
} READYSTATE;

Contains values that indicate what state an object is in. This is used with the ReadyState property and the IWebBrowser2::get_ReadyState method.

Values
READYSTATE_UNINITIALIZED The default initialization state.
READYSTATE_LOADING The object is currently loading its properties.
READYSTATE_LOADED The object has been initialized.
READYSTATE_INTERACTIVE The object is interactive, but not all of its data is available.
READYSTATE_COMPLETE The object has received all of its data.

RefreshConstants

typedef enum RefreshConstants {
    REFRESH_NORMAL = 0,
    REFRESH_IFEXPIRED = 1,
    REFRESH_CONTINUE = 2,
    REFRESH_COMPLETELY = 3
} RefreshConstants;

Contains values used with the Refresh2 and IWebBrowser2::Refresh2 methods.

The "pragma:nocache" header tells the server not to return a cached copy but to ensure that the information is as fresh as possible. Browsers typically send this header when the user selects Refresh, but the header can cause problems for some servers.

Values
REFRESH_NORMAL Perform a lightweight refresh that does not include sending the HTTP "pragma:nocache" header to the server.
REFRESH_IFEXPIRED Perform a lightweight refresh if the page has expired.
REFRESH_CONTINUE For internal use only; do not use.
REFRESH_COMPLETELY Perform a full refresh that includes sending a "pragma:nocache" header to the server (HTTP URLs only).

See also Refresh, IWebBrowser2::Refresh

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.