首先,Windows Runtime Component(C++/WinRT)模板使用的是C++/WinRT进行创建和使用,而Windows Runtime Component(Universal Windows)使用的是C++/CX语法,比起C++语法多了“hat”(^)和其他语言拓展。在性能方面,同样的代码,C++/WinRT比C++/CX性能更佳,生成的二进制文件更小,代码运行更快。另外,对于 C++
开发人员,我们建议你使用 C++/WinRT 编写新应用程序。 C++/WinRT 是 Windows 运行时 (WinRT) API 的完全标准新式 C++17 语言投影,以基于标头文件的库的形式实现,旨在为你提供对新式 Windows API 的一流访问。 若要了解如何使用 C++/WinRT 创建 Windows 运行时组件,请参阅使用
C++/WinRT 创建 Windows 运行时组件。
祝好。
"Developing Universal Windows apps" forum will be migrating to a new home on
Microsoft Q&A (Preview)!
We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on
Microsoft Q&A (Preview)!
For more information, please refer to the
sticky post.