Share via


CHtmlView::Navigate

Call this member function to navigate to the resource identified by a URL.

void Navigate( 
   LPCTSTR URL, 
   DWORD dwFlags = 0, 
   LPCTSTR lpszTargetFrameName = NULL, 
   LPCTSTR lpszHeaders = NULL, 
   LPVOID lpvPostData = NULL, 
   DWORD dwPostDataLen = 0  
);

Parameters

  • URL
    A caller-allocated string that contains the URL to navigate to, or the full path of the file to display.

  • dwFlags
    The flags of a variable that specifies whether to add the resource to the history list, whether to read to or write from the cache, and whether to display the resource in a new window. The variable can be a combination of the values defined by the BrowserNavConstants enumeration.

  • lpszTargetFrameName
    A pointer to a string that contains the name of the frame in which to display the resource.

  • lpszHeaders
    A pointer to a value that specifies the HTTP headers to send to the server. These headers are added to the default Internet Explorer headers. The headers can specify such things as the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if URL is not an HTTP URL.

  • lpvPostData
    A pointer to the data to send with the HTTP POST transaction. For example, the POST transaction is used to send data gathered by an HTML form. If this parameter does not specify any post data, Navigate issues an HTTP GET transaction. This parameter is ignored if URL is not an HTTP URL.

  • dwPostDataLen
    Data to send with the HTTP POST transaction. For example, the POST transaction is used to send data gathered by an HTML form. If this parameter does not specify any post data, Navigate issues an HTTP GET transaction. This parameter is ignored if URL is not an HTTP URL.

Remarks

Applies to Internet Explorer and WebBrowser.

Requirements

Header: afxhtml.h

See Also

Reference

CHtmlView Class

Hierarchy Chart

CHtmlView::Navigate2

IWebBrowser2::Navigate

Other Resources

CHtmlView Members