Skip to content

Commit 9b3b9af

Browse files
committed
Create updated DrawingIsland sample using public WASDK 1.5
Update the DrawingIsland sample using public WASDK 1.5 APIs.
1 parent 62316b1 commit 9b3b9af

37 files changed

+2915
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34728.123
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DrawingIslandApp", "DrawingIslandApp\DrawingIslandApp.vcxproj", "{74605FC4-2E57-459F-947B-AEF9F6921AE8}"
7+
EndProject
8+
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "DrawingIslandPackage", "DrawingIslandPackage\DrawingIslandPackage.wapproj", "{3099B355-5306-4814-BC1C-08AB3F29B32E}"
9+
EndProject
10+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DrawingIslandComponents", "DrawingIslandComponents\DrawingIslandComponents.vcxproj", "{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}"
11+
EndProject
12+
Global
13+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
14+
Debug|ARM64 = Debug|ARM64
15+
Debug|x64 = Debug|x64
16+
Debug|x86 = Debug|x86
17+
Release|ARM64 = Release|ARM64
18+
Release|x64 = Release|x64
19+
Release|x86 = Release|x86
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Debug|ARM64.ActiveCfg = Debug|ARM64
23+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Debug|ARM64.Build.0 = Debug|ARM64
24+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Debug|x64.ActiveCfg = Debug|x64
25+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Debug|x64.Build.0 = Debug|x64
26+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Debug|x86.ActiveCfg = Debug|Win32
27+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Debug|x86.Build.0 = Debug|Win32
28+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Release|ARM64.ActiveCfg = Release|ARM64
29+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Release|ARM64.Build.0 = Release|ARM64
30+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Release|x64.ActiveCfg = Release|x64
31+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Release|x64.Build.0 = Release|x64
32+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Release|x86.ActiveCfg = Release|Win32
33+
{74605FC4-2E57-459F-947B-AEF9F6921AE8}.Release|x86.Build.0 = Release|Win32
34+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|ARM64.ActiveCfg = Debug|ARM64
35+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|ARM64.Build.0 = Debug|ARM64
36+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|ARM64.Deploy.0 = Debug|ARM64
37+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|x64.ActiveCfg = Debug|x64
38+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|x64.Build.0 = Debug|x64
39+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|x64.Deploy.0 = Debug|x64
40+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|x86.ActiveCfg = Debug|x86
41+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|x86.Build.0 = Debug|x86
42+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Debug|x86.Deploy.0 = Debug|x86
43+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|ARM64.ActiveCfg = Release|ARM64
44+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|ARM64.Build.0 = Release|ARM64
45+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|ARM64.Deploy.0 = Release|ARM64
46+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|x64.ActiveCfg = Release|x64
47+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|x64.Build.0 = Release|x64
48+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|x64.Deploy.0 = Release|x64
49+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|x86.ActiveCfg = Release|x86
50+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|x86.Build.0 = Release|x86
51+
{3099B355-5306-4814-BC1C-08AB3F29B32E}.Release|x86.Deploy.0 = Release|x86
52+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Debug|ARM64.ActiveCfg = Debug|ARM64
53+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Debug|ARM64.Build.0 = Debug|ARM64
54+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Debug|x64.ActiveCfg = Debug|x64
55+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Debug|x64.Build.0 = Debug|x64
56+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Debug|x86.ActiveCfg = Debug|Win32
57+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Debug|x86.Build.0 = Debug|Win32
58+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Release|ARM64.ActiveCfg = Release|ARM64
59+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Release|ARM64.Build.0 = Release|ARM64
60+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Release|x64.ActiveCfg = Release|x64
61+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Release|x64.Build.0 = Release|x64
62+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Release|x86.ActiveCfg = Release|Win32
63+
{709C54E1-0F2F-4A59-80B2-4CFD08B720E5}.Release|x86.Build.0 = Release|Win32
64+
EndGlobalSection
65+
GlobalSection(SolutionProperties) = preSolution
66+
HideSolutionNode = FALSE
67+
EndGlobalSection
68+
GlobalSection(ExtensibilityGlobals) = postSolution
69+
SolutionGuid = {85542A88-746B-4646-9027-3AA360D075C2}
70+
EndGlobalSection
71+
EndGlobal
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3+
<assemblyIdentity version="1.0.0.0" name="DrawingIslandApp.app"/>
4+
5+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
6+
<windowsSettings>
7+
<!-- The combination of below two tags have the following effect:
8+
1) Per-Monitor for >= Windows 10 Anniversary Update
9+
2) System < Windows 10 Anniversary Update
10+
-->
11+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
12+
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
13+
</windowsSettings>
14+
</application>
15+
</assembly>
Binary file not shown.
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.props" Condition="Exists('..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.props')" />
4+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
5+
<Import Project="..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.props" Condition="Exists('..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.props')" />
6+
<PropertyGroup Label="Globals">
7+
<CppWinRTOptimized>true</CppWinRTOptimized>
8+
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
9+
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
10+
<MinimalCoreWin>true</MinimalCoreWin>
11+
<VCProjectVersion>15.0</VCProjectVersion>
12+
<ProjectGuid>{74605fc4-2e57-459f-947b-aef9f6921ae8}</ProjectGuid>
13+
<Keyword>Win32Proj</Keyword>
14+
<RootNamespace>DrawingIslandApp</RootNamespace>
15+
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22621.0</WindowsTargetPlatformVersion>
16+
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
17+
<ProjectName>DrawingIslandApp</ProjectName>
18+
</PropertyGroup>
19+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
20+
<ItemGroup Label="ProjectConfigurations">
21+
<ProjectConfiguration Include="Debug|ARM64">
22+
<Configuration>Debug</Configuration>
23+
<Platform>ARM64</Platform>
24+
</ProjectConfiguration>
25+
<ProjectConfiguration Include="Debug|Win32">
26+
<Configuration>Debug</Configuration>
27+
<Platform>Win32</Platform>
28+
</ProjectConfiguration>
29+
<ProjectConfiguration Include="Release|ARM64">
30+
<Configuration>Release</Configuration>
31+
<Platform>ARM64</Platform>
32+
</ProjectConfiguration>
33+
<ProjectConfiguration Include="Release|Win32">
34+
<Configuration>Release</Configuration>
35+
<Platform>Win32</Platform>
36+
</ProjectConfiguration>
37+
<ProjectConfiguration Include="Debug|x64">
38+
<Configuration>Debug</Configuration>
39+
<Platform>x64</Platform>
40+
</ProjectConfiguration>
41+
<ProjectConfiguration Include="Release|x64">
42+
<Configuration>Release</Configuration>
43+
<Platform>x64</Platform>
44+
</ProjectConfiguration>
45+
</ItemGroup>
46+
<PropertyGroup Label="Configuration">
47+
<ConfigurationType>Application</ConfigurationType>
48+
<PlatformToolset>v143</PlatformToolset>
49+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
50+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
51+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
52+
<CharacterSet>Unicode</CharacterSet>
53+
</PropertyGroup>
54+
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
55+
<UseDebugLibraries>true</UseDebugLibraries>
56+
<LinkIncremental>true</LinkIncremental>
57+
</PropertyGroup>
58+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
59+
<UseDebugLibraries>false</UseDebugLibraries>
60+
<WholeProgramOptimization>true</WholeProgramOptimization>
61+
<LinkIncremental>false</LinkIncremental>
62+
</PropertyGroup>
63+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
64+
<ImportGroup Label="ExtensionSettings">
65+
</ImportGroup>
66+
<ImportGroup Label="Shared">
67+
</ImportGroup>
68+
<ImportGroup Label="PropertySheets">
69+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70+
</ImportGroup>
71+
<ImportGroup Label="PropertySheets">
72+
<Import Project="PropertySheet.props" />
73+
</ImportGroup>
74+
<PropertyGroup Label="UserMacros" />
75+
<ItemDefinitionGroup>
76+
<ClCompile>
77+
<PrecompiledHeader>Use</PrecompiledHeader>
78+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
79+
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
80+
<PreprocessorDefinitions>_CONSOLE;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
81+
<WarningLevel>Level4</WarningLevel>
82+
<AdditionalOptions>%(AdditionalOptions) /permissive- /bigobj</AdditionalOptions>
83+
</ClCompile>
84+
<Link>
85+
<SubSystem>Windows</SubSystem>
86+
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
87+
</Link>
88+
</ItemDefinitionGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
90+
<ClCompile>
91+
<Optimization>Disabled</Optimization>
92+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
93+
</ClCompile>
94+
</ItemDefinitionGroup>
95+
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
96+
<ClCompile>
97+
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
98+
</ClCompile>
99+
</ItemDefinitionGroup>
100+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
101+
<ClCompile>
102+
<Optimization>MaxSpeed</Optimization>
103+
<FunctionLevelLinking>true</FunctionLevelLinking>
104+
<IntrinsicFunctions>true</IntrinsicFunctions>
105+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
106+
</ClCompile>
107+
<Link>
108+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
109+
<OptimizeReferences>true</OptimizeReferences>
110+
</Link>
111+
</ItemDefinitionGroup>
112+
<ItemGroup>
113+
<ClInclude Include="pch.h" />
114+
<ClInclude Include="resource.h" />
115+
<ClCompile Include="WinMain.cpp" />
116+
<ClCompile Include="pch.cpp">
117+
<PrecompiledHeader>Create</PrecompiledHeader>
118+
</ClCompile>
119+
<ResourceCompile Include="DrawingIslandApp.rc" />
120+
<Manifest Include="DrawingIslandApp.exe.manifest" />
121+
<None Include="packages.config" />
122+
<None Include="PropertySheet.props" />
123+
<Text Include="readme.txt">
124+
<DeploymentContent>false</DeploymentContent>
125+
</Text>
126+
</ItemGroup>
127+
<ItemGroup>
128+
<ProjectReference Include="..\DrawingIslandComponents\DrawingIslandComponents.vcxproj">
129+
<Project>{709c54e1-0f2f-4a59-80b2-4cfd08b720e5}</Project>
130+
</ProjectReference>
131+
</ItemGroup>
132+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
133+
<ImportGroup Label="ExtensionTargets">
134+
<Import Project="..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.targets" Condition="Exists('..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.targets')" />
135+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
136+
<Import Project="..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.targets" Condition="Exists('..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.targets')" />
137+
</ImportGroup>
138+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
139+
<PropertyGroup>
140+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
141+
</PropertyGroup>
142+
<Error Condition="!Exists('..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.props'))" />
143+
<Error Condition="!Exists('..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.WindowsAppSDK.1.5.240404000\build\native\Microsoft.WindowsAppSDK.targets'))" />
144+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
145+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
146+
<Error Condition="!Exists('..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.props'))" />
147+
<Error Condition="!Exists('..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.3233\build\Microsoft.Windows.SDK.BuildTools.targets'))" />
148+
</Target>
149+
</Project>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClInclude Include="pch.h">
19+
<Filter>Header Files</Filter>
20+
</ClInclude>
21+
<ClInclude Include="resource.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
</ItemGroup>
25+
<ItemGroup>
26+
<ClCompile Include="pch.cpp">
27+
<Filter>Source Files</Filter>
28+
</ClCompile>
29+
<ClCompile Include="WinMain.cpp">
30+
<Filter>Source Files</Filter>
31+
</ClCompile>
32+
</ItemGroup>
33+
<ItemGroup>
34+
<None Include="PropertySheet.props" />
35+
<None Include="packages.config" />
36+
</ItemGroup>
37+
<ItemGroup>
38+
<Text Include="readme.txt" />
39+
</ItemGroup>
40+
<ItemGroup>
41+
<Manifest Include="DrawingIslandApp.exe.manifest" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<ResourceCompile Include="DrawingIslandApp.rc">
45+
<Filter>Resource Files</Filter>
46+
</ResourceCompile>
47+
</ItemGroup>
48+
</Project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ImportGroup Label="PropertySheets" />
4+
<PropertyGroup Label="UserMacros" />
5+
<!--
6+
To customize common C++/WinRT project properties:
7+
* right-click the project node
8+
* expand the Common Properties item
9+
* select the C++/WinRT property page
10+
11+
For more advanced scenarios, and complete documentation, please see:
12+
https://github.com/Microsoft/cppwinrt/tree/master/nuget
13+
-->
14+
<PropertyGroup />
15+
<ItemDefinitionGroup />
16+
</Project>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
#include "pch.h"
5+
6+
namespace winrt
7+
{
8+
using namespace Microsoft::UI;
9+
using namespace Microsoft::UI::Composition;
10+
using namespace Microsoft::UI::Content;
11+
using namespace Microsoft::UI::Dispatching;
12+
using namespace Microsoft::UI::Input;
13+
using namespace Microsoft::UI::Windowing;
14+
15+
using namespace DrawingIslandComponents;
16+
}
17+
18+
int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
19+
{
20+
winrt::init_apartment(winrt::apartment_type::single_threaded);
21+
22+
auto controller{ winrt::DispatcherQueueController::CreateOnCurrentThread() };
23+
auto queue = controller.DispatcherQueue();
24+
25+
auto window = winrt::AppWindow::Create();
26+
window.AssociateWithDispatcherQueue(queue);
27+
window.Closing([&](auto&&, auto&&)
28+
{
29+
queue.EnqueueEventLoopExit();
30+
});
31+
32+
window.Title(L"Drawing Island");
33+
window.Show();
34+
35+
auto compositor = winrt::Compositor();
36+
auto drawing = winrt::DrawingIsland(compositor);
37+
38+
auto siteBridge = winrt::DesktopChildSiteBridge::Create(compositor, window.Id());
39+
siteBridge.ResizePolicy(winrt::ContentSizePolicy::ResizeContentToParentWindow);
40+
siteBridge.Show();
41+
siteBridge.Connect(drawing.Island());
42+
43+
queue.RunEventLoop();
44+
45+
controller.ShutdownQueue();
46+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
4+
<package id="Microsoft.Windows.SDK.BuildTools" version="10.0.22621.3233" targetFramework="native" />
5+
<package id="Microsoft.WindowsAppSDK" version="1.5.240404000" targetFramework="native" />
6+
</packages>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
#include "pch.h"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
#pragma once
5+
6+
#include <windows.h>
7+
#ifdef GetCurrentTime
8+
#undef GetCurrentTime
9+
#endif
10+
#include <winrt/Windows.Foundation.h>
11+
#include <winrt/Windows.Foundation.Collections.h>
12+
#include <winrt/Windows.System.h>
13+
14+
#include <winrt/Microsoft.UI.h>
15+
#include <winrt/Microsoft.UI.Composition.h>
16+
#include <winrt/Microsoft.UI.Content.h>
17+
#include <winrt/Microsoft.UI.Dispatching.h>
18+
#include <winrt/Microsoft.UI.Input.h>
19+
#include <winrt/Microsoft.UI.Windowing.h>
20+
21+
#include "winrt/DrawingIslandComponents.h"

0 commit comments

Comments
 (0)