Skip to content

Commit

Permalink
move to assets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
billxc committed Feb 23, 2024
1 parent d2d2233 commit 0e8fa8d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
33 changes: 26 additions & 7 deletions Edge_Launcher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,32 @@
<ClCompile Include="HelloWebView.cpp" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="assets/index.html" />
<CopyFileToFolders Include="assets/vue-1.0.js" />
<CopyFileToFolders Include="assets/edge.ico" />
<CopyFileToFolders Include="assets/edge_beta.ico" />
<CopyFileToFolders Include="assets/edge_canary.ico" />
<CopyFileToFolders Include="assets/edge_dev.ico" />
<CopyFileToFolders Include="assets/model.js" />
<CopyFileToFolders Include="assets/index.html">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/vue-1.0.js">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/vue-1.0.min.js">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/edge.ico">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/edge_beta.ico">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/edge_canary.ico">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/edge_dev.ico">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/model.js">
<DestinationFolders>$(OutDir)/assets/</DestinationFolders>
</CopyFileToFolders>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand Down
9 changes: 0 additions & 9 deletions Edge_Launcher.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,4 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="assets/index.html" />
<CopyFileToFolders Include="assets/vue-1.0.js" />
<CopyFileToFolders Include="assets/edge.png">
<Filter>Resource Files</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets/simple.html" />
<CopyFileToFolders Include="assets/model.js" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion HelloWebView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int CALLBACK WinMain(
settings->put_AreDefaultScriptDialogsEnabled(TRUE);
settings->put_IsWebMessageEnabled(TRUE);
auto settings8 = settings.query<ICoreWebView2Settings8>();
webview_2_3->SetVirtualHostNameToFolderMapping(L"edge-launcher.localapp", L".", COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW);
webview_2_3->SetVirtualHostNameToFolderMapping(L"edge-launcher.localapp", L"./assets", COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW);

// Resize WebView to fit the bounds of the parent window
RECT bounds;
Expand Down
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
---
description: "Completed Visual Studio project from the tutorial Get started with WebView2 in Win32 apps."
languages:
- cpp
page_type: sample
products:
- microsoft-edge
urlFragment: Win32_GettingStarted
---
# Get started with WebView2 in Win32 apps

<!-- only enough info to differentiate this sample vs the others; what is different about this sample compared to the sibling samples? -->
This sample, **Win32_GettingStarted**, is a completed Visual Studio project that includes WebView2 code already added for you. The tutorial [Get started with WebView2 in Win32 apps](https://learn.microsoft.com/microsoft-edge/webview2/get-started/win32) starts by opening this completed project.
# An elegant Edge Laucher for Win32

![The running app for the Win32 Get Started tutorial](screenshots/bing-window.png)

0 comments on commit 0e8fa8d

Please sign in to comment.