Skip to content

Commit a7c9872

Browse files
committed
simplify opening sln
1 parent 0acfc42 commit a7c9872

2 files changed

Lines changed: 18 additions & 35 deletions

File tree

Binary file not shown.

microsoft-edge/webview2/samples/webview2apissample.md

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,17 @@ Opening and building the sample will modify the sample. Best practice is to avo
164164

165165
1. Click the **OK** button.
166166

167+
The solution opens in Visual Studio:
168+
169+
![The WebView2APISample project selected in Solution Explorer](./webview2apissample-images/webview2apisample-project-selected.png)<!-- instance 1 of png -->
170+
167171

168172
<!-- ====================================================================== -->
169173
## Step 4: Update the toolset
170174

171-
Continuing from above: The **Review Solution Actions** dialog might open:
175+
Continuing from above: The **Review Solution Actions: Retarget Projects** dialog might open:
172176

173-
![The "Review Solution Actions" dialog](./webview2apissample-images/review-solution-actions.png)
177+
![The "Review Solution Actions" dialog](./webview2apissample-images/retarget-projects.png)
174178

175179
This screenshot shows:
176180
* **Windows SDK Version:** **10.0 (latest installed version)**
@@ -276,7 +280,7 @@ At the top of Visual Studio, set the build target, as follows:
276280

277281
1. In **Solution Explorer**, right-click the **WebView2APISample** project, and then select **Build**.
278282

279-
![The WebView2APISample project selected in Solution Explorer](./webview2apissample-images/webview2apisample-project-selected.png)
283+
![The WebView2APISample project selected in Solution Explorer](./webview2apissample-images/webview2apisample-project-selected.png)<!-- instance 2 of png -->
280284

281285
This builds the project file `SampleApps/WebView2APISample/WebView2APISample.vcxproj`.
282286

@@ -313,15 +317,15 @@ The repo version of this sample has a Prerelease version of the WebView2 SDK ins
313317

314318
![NuGet Package Manager with WebView2 SDK prerelease selected](./webview2apissample-images/webview2apisample-pkg-mgr-prerelease-webview2.png)
315319

316-
1. To the right of the search text box, select the **Include prerelease** check box.
320+
1. To the right of the **Search** text box, select the **Include prerelease** check box.
317321

318322
1. On the left, select **Microsoft.Web.WebView2**.
319323

320324
1. On the right, in the **Version** dropdown list, select the latest **-prerelease** version.
321325

322326
1. To the right of the **Version** dropdown list, click the **Update** button.
323327

324-
The **Preview Changes** dialog appears:
328+
The **Preview Changes** dialog opens:
325329

326330
![The Preview Changes dialog for the WebView2 NugGet package](./webview2apissample-images/webview2apisample-webview2-pkg-preview-changes.png)
327331

@@ -342,17 +346,14 @@ Assuming you updated the Prerelease version of the WebView2 SDK, build and run t
342346

343347
1. In **Solution Explorer**, right-click the **WebView2APISample** project, and then select **Build**.
344348

345-
![WebView2APISample project selected in Solution Explorer](./webview2apissample-images/webview2apisample-project-selected.png)
346-
347349
1. Select **Debug** > **Start Debugging** (**F5**).
348350

349351
The **WebView2APISample** app window opens:
350352

351353
![The WebView2APISample app window](./webview2apissample-images/webview2apisample-app-window.png)
352354

353-
1. Use the **WebView2APISample** app.
355+
1. Close the sample app window.
354356

355-
1. In Visual Studio, select **Debug** > **Stop Debugging**. Visual Studio closes the app.
356357

357358
You obtained, updated, built, and ran the Win32 sample app.
358359

@@ -370,55 +371,37 @@ These steps assume you obtained, updated, built, and ran the Win32 sample app pe
370371

371372
The **WebView2APISample** sample and project is the main Win32 sample.
372373

373-
1. If the solution `WebView2Samples.sln` isn't already open in Visual Studio, open it; for example, press the **Windows** key, enter **Visual Studio 2022**, and then click **Open**.
374-
375-
The Visual Studio **Open recent** dialog opens.
376-
377-
1. Click **Continue without code**, in the lower right.
378-
379-
1. In Visual Studio 2022, select **File** > **Open** > **Project/Solution**.
380-
381-
The **Open Project/Solution** dialog opens.
382-
383-
1. Navigate to the `WebView2Samples\SampleApps\WebView2Samples.sln` file, and then click the **Open** button.
374+
1. Open `WebView2Samples.sln` in Visual Studio.
384375

385376
Example path:
386377

387378
```
388379
C:\Users\localAccount\GitHub\WebView2Samples\SampleApps\WebView2Samples.sln
389380
```
390381

391-
1. Click the **OK** button.
392-
393-
394-
<!-- ------------------------------ -->
395-
#### Projects in this solution file
396-
397-
In Solution Explorer, the solution file `WebView2Samples.sln` contains the main sample (**WebView2APISample**) and other samples as well:
382+
This solution file contains the main sample (**WebView2APISample**) and other samples as well:
398383

399-
![All projects in the solution in Solution Explorer](./webview2apissample-images/all-projects-in-solution-explorer.png)
384+
![All projects in the solution in Solution Explorer](./webview2apissample-images/all-projects-in-solution-explorer.png)
400385

401386
1. In **Solution Explorer**, expand the **WebView2APISample** project:
402387

403-
![The WebView2APISample project in Solution Explorer](./webview2apissample-images/webview2apisample-in-solution-explorer.png)
388+
![The WebView2APISample project in Solution Explorer](./webview2apissample-images/webview2apisample-in-solution-explorer.png)
404389

405390

406391
<!-- ====================================================================== -->
407392
## Hybrid app architecture
408393

409-
The **WebView2APISample** app is an example of a hybrid application, with a Win32 native part and a WebView part.
410-
* The Win32 part can directly access native Windows APIs.
411-
* The WebView is a container for standard web technologies (HTML, CSS, and JavaScript).
394+
The **WebView2APISample** app is an example of a hybrid application, with a Win32 native part and a WebView part:
412395

413396
![Hybrid app](./webview2apissample-images/sample-app-layout-diagram.png)
414397

415-
* Section 1: The top part of the **WebView2APISample** app is a Win32 component written in C++. This part of the application takes in UI inputs from the user and uses them to control the WebView.
398+
* The Win32 part can directly access native Windows APIs. The top part of the **WebView2APISample** app is a Win32 component written in C++. This part of the application takes in UI inputs from the user and uses them to control the WebView.
416399

417-
* Section 2: The main part of the **WebView2APISample** app is a WebView that can be repurposed using standard web technologies (HTML/CSS/JavaScript). It can be navigated to websites or local content.
400+
* The WebView is a container for standard web technologies (HTML, CSS, and JavaScript). The main part of the **WebView2APISample** app is a WebView that can be repurposed using standard web technologies (HTML/CSS/JavaScript). The WebView can be navigated to websites or local content.
418401

419402
This hybrid approach allows you to create and iterate faster using web technologies, while still being able to take advantage of native functionality. The **WebView2APISample** app demonstrates how the Win32 component and the WebView component can interact with each other.
420403

421-
This wide-ranging sample app has grown to include over 150 menuitems, demonstrating many WebView2 APIs in the Win32/C++ framework. The following sections focus on basics of hybrid app implementation.
404+
This sample app has over 100 menuitems, which demonstrate many WebView2 APIs in the Win32/C++ framework. The following sections focus on basics of hybrid app implementation.
422405

423406

424407
<!-- ====================================================================== -->

0 commit comments

Comments
 (0)