Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NM_BEFORENAVIGATE

Windows Mobile 6.5
4/8/2010

This notification message is sent by the HTML viewer control before a navigation request to a URL begins.


NM_BEFORENAVIGATE
NM_HTMLVIEW * pnmHTMLView = (NM_HTMLVIEW *)lParam;
szURL = pnmHTMLView->szTarget;
szPostData = pnmHTMLView->szData;
dwFlags = pnmHTMLView->dwFlags;
pszHeaders = pnmHTMLView->szExInfo;

szURL

A null-terminated string that contains the navigation URL.

szPostData

A null-terminated string that contains the navigation POST data.

dwFlags

The following table gives various values and descriptions.

Value Description

NAVIGATEFLAG_REFRESH

The navigation is a forced refresh of the URL content from the server, without checking expiration time or last-modified time.

NAVIGATEFLAG_RELATIVE

The navigation is relative to the current page.

NAVIGATEFLAG_ENTERED

The user entered the URL for the navigation.

NAVIGATEFLAG_IGNORETARGET

The navigation is ignoring the TARGET attribute (if navigated via an <A HREF> tag.

NAVIGATEFLAG_GETFROMCACHE

The navigation loads the content from the cache, without checking expiration time. Goes online only if there is no cache.

NAVIGATEFLAG_NOCACHE

The content of the navigation will not be cached.

NAVIGATEFLAG_RELOAD

Same as NAVIGATEFLAG_REFRESH, except that the referer on the HTTP request does not get set, and the content may be loaded from the cache if it has not expired.

NAVIGATEFLAG_RESYNCHRONIZE

The navigation checks the server to see that the most recent content is available. This will allow the HTML control to go online without checking the expiration time. Then, the underlying code will compare the "last modified" time with the server, and download the more recent content, if necessary.

pszHeaders

A null-terminated string that contains the headers sent to the server for the navigation.

The return value is ignored by the control.

The information contained in the szURL parameter returned by NM_BEFORENAVIGATE is the navigation URL as it appeared in the SendMessage argument list before being composed into a complete and valid navigation URL. The information contained in the szURL parameter returned by NM_NAVIGATECOMPLETE is the complete navigation URL.

To navigate to msn.com:

SendMessage(g_hWndCtrl, DTM_NAVIGATE, 0, (LPARAM)TEXT("http://msn.com/));

This actually navigates to http://www.msn.com. The szURL parameter returned by NM_BEFORENAVIGATE is "http://msn.com", but the szURL parameter returned by NM_NAVIGATECOMPLETE is "http://www.msn.com".

Headerhtmlctrl.h
Libraryhtmlctrl.lib
Windows MobilePocket PC 2002 and later, Smartphone 2002 and later

Community Additions

Show:
© 2015 Microsoft