Поделиться через


CHtmlView::OnBeforeNavigate2

This member function is called by the framework to cause an event to fire before a navigation occurs in the web browser.

virtual void OnBeforeNavigate2(
   LPCTSTR lpszURL,
   DWORD nFlags,
   LPCTSTR lpszTargetFrameName,
   CByteArray& baPostedData,
   LPCTSTR lpszHeaders,
   BOOL* pbCancel 
);

Параметры

  • lpszURL
    Pointer to a string containing the URL to navigate to.

  • nFlags
    Reserved for future use.

  • lpszTargetFrameName
    A 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.

  • baPostedData
    A reference to a CByteArray object containing the data to send to the server if the HTTP POST transaction is being used.

  • lpszHeaders
    A pointer to a string containing additional HTTP headers to send to the server (HTTP URLs only). 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.

  • pbCancel
    A pointer to a cancel flag. An application can set this parameter to nonzero to cancel the navigation operation, or to zero to allow it to proceed.

Требования

Header: afxhtml.h

См. также

Основные понятия

CHtmlView Class

CHtmlView Members

Hierarchy Chart

CHtmlView::Navigate

CHtmlView::Navigate2

DWebBrowserEvents2::BeforeNavigate2