Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Implementation of WebView2

Started by jorgon, May 23, 2024, 03:01:02 PM

Previous topic - Next topic


Hi All

WebView2 allows you to embed a modern (Chromium/Edge) browser in an ordinary Window.
The SDK is mostly .net, but there are some C++ examples.
However, how it works is exceptionally obscure - until now!
Here is an implementation of WebView2 in one file using GoAsm (no includes - hurrah!).

The code relies on one Windows redistributable DLL - WebView2Loader.dll (in this case the 32 bit version).  The call to that DLL kicks everything off as can be seen from the code.





CommWebView2 builds on HelloWebView2.asm to show how it is possible to establish two way communication with the WebView2 browser, and use it as a rich text (html) editor.  It explains the use of Navigate, NavigateToString, ExecuteScript, execCommand, and add_WebMessageReceived.