Help Center

CWebView2.AddWebMessageReceivedmethod

Add an event handler for the WebMessageReceived event.

WebViewmethoddocumented

Syntax

FUNCTION AddWebMessageReceived ( BYVAL eventHandler AS Afx_ICoreWebView2WebMessageReceivedEventHandler PTR, BYVAL token AS EventRegistrationToken PTR) AS HRESULT
Also documented as RemoveWebMessageReceived — one description covers them all.

Parameters

NameDescription
eventHandlerPointer to an ICoreWebView2WebMessageReceivedEventHandler.
tokenToken that uniquely identifies the subscription.

Description

Adds/removes an event handler for the WebMessageReceived event.

Reference

  • Defined in AfxNova/CWebView2.inc:1403
  • Documented in WebView/CWebWiew2 Class.md
  • Topic: CWebView2 Class