我已经知道我是使用WinRT宏为__cplusplus_winrt构建的,但是我想进一步区分Windows和Windows。我应该检查哪个宏?
发布于 2014-07-26 04:43:21
在搜索了相当长一段时间之后,我确信唯一的解决方案就是使用项目定义的宏。这并不理想,但要把工作做好。
更新
最近我发现这些宏:
#if (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP)
//You're in WinRT and it's Windows App
#elif (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
//It's Windows Phone, but still don't know it's Silverlight Dll or WinRT Dll
#else
//Desktop
#endif现在我只需要使用项目宏来区分Windows和Windows应用程序,我开始相信我不需要^_^
https://stackoverflow.com/questions/24850375
复制相似问题