TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Windows 8 Runtime reference and sample code [MSDN]

17 点作者 pcj超过 13 年前

4 条评论

pcj超过 13 年前
Sample Code - <a href="http://code.msdn.microsoft.com/windowsapps" rel="nofollow">http://code.msdn.microsoft.com/windowsapps</a>
pavlov超过 13 年前
This really is a completely new user-level API. There's no trace of traditional Win32 concepts: no window handles, no window classes, no event loop... (Yes, no more WPARAM and LPARAM either. Goodbye 1985!)<p>For years Microsoft has been trying to come up with a successor for Win32. This looks like the most credible attempt yet.<p>I don't think this API will be accessible from standard C/C++, though. All the code samples require Microsoft's C++/CLI dialect.<p>For example, here's what <i>main.cpp</i> looks like for one of the app samples that uses a Direct3D view:<p><pre><code> #include "DirectXViewProvider.h" [Platform::MTAThread] int main(array&#60;Platform::String^&#62;^) { auto directXViewProviderFactory = ref new DirectXViewProviderFactory(); Windows::ApplicationModel::Core::CoreApplication::Run(directXViewProviderFactory); return 0; } </code></pre> It's certainly a great improvement over the old WinMain() and running your own event loop. However, those ^ symbols indicate managed CLI objects. When these are even in the main() function signature, it suggests that C++/CLI is a hard requirement.<p>I'm not sure how this will affect other compilers on Windows. AFAIK, Visual C++ is the only compiler with C++/CLI compatibility. Will it be impossible to build full apps using GCC on Windows 8?
评论 #2995426 未加载
billforsternz超过 13 年前
Am I the only dev in the world who doesn't know what a "Metro style app" is ? Trying to find out what a metro style app actually is on MSDN is a frustrating exercise. It's annoying when any organization invents new terminology and then acts as if it is a fundamental part of the language.
评论 #2995094 未加载
BonoboBoner超过 13 年前
Samples are available in C++, C# and..... JS. Never would have thought to see that happen.