如何检测是否在 Windows Metro 应用程序进程中运行
How to detect if running inside Windows Metro application process?
我正在开发一个库,我希望能够检测它是否在 Metro 风格的应用程序中运行,以有选择地禁用/启用某些功能。可能吗?
您可以使用
IMetroMode
接口检查您的库是否已加载到 Metro 风格的应用程序中。调用 GetMonitorMode()
方法,如果pMode
将保持MMM_METRO
则确保在 Metro 应用程序中运行。
这是一个简单的测试:
if (WinJS) {
// WinJS exists in global if in WinRT app
}
相关文章:
- 在VS代码中交叉编译Windows与Linux上的MinGW的SDL程序
- 在Linux for Windows上编译C++代码时出错
- 在Windows上用C++裁剪HBITMAP
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 如何在 Windows 8 中的桌面应用程序中访问 Metro 应用的本地存储?
- 我可以使用纯本机C 为Windows 8 Metro编写应用程序
- 在Windows 8 metro应用程序上同步两个ppl任务
- 是否可以将Windows 8(Metro)C++/DDirectX游戏与(Metro)C#/XAML启动器相结合
- 在Windows 8 Metro应用程序中打开外部SQLite数据库
- 列出在Windows 8上使用Windows UI Automation的Metro应用程序的所有UI元素
- Dektop和metro Windows 8的通用用户界面
- 如何检测是否在 Windows Metro 应用程序进程中运行
- 类似于Windows 8下Metro风格应用程序的功能
- 有关使用 C++ XAML for Metro 进行 Windows 8 编程的资源和信息
- Windows 8/Metro认证要求-如何检查
- 在c++, Windows Store Metro应用程序中设置控件的颜色
- Windows Metro c++ c# -如何添加WinRT可移植项目的命名空间
- 合并声音文件音频和记录在寡妇8 Metro Windows Store应用程序
- 如何使用WinRT在Windows 8 Metro应用程序中播放声音文件
- 在Windows 8 metro上构建默认的cocos2d-x项目