description | extendedZipContent | languages | page_type | products | urlFragment | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Demonstrates the features and usage patterns of WebView2 in a Win32 app. |
|
|
sample |
|
WebView2APISample |
This sample, WebView2APISample, embeds a WebView2 control within a Win32 application.
This sample is built as a Win32 Visual Studio 2019 project. It uses C++ in the native environment together with HTML/CSS/JavaScript in the WebView2 environment. This sample showcases many of WebView2's event handlers and API methods that allow a native Win32 application to directly interact with a WebView, and vice versa.
The solution file for this sample is in the parent directory: SampleApps/WebView2Samples.sln
. The solution file includes a copy of some of the other, sibling samples for other frameworks or platforms.
To use this sample, see Win32 sample app.
This is the main WebView2 sample. The running WebView2APISample app window shows the WebView2 SDK version and also the WebView2 Runtime version and path. The WebView2APISample app has several menus containing many menuitems that demonstrate a broad range of WebView2 APIs: