我想指示我的应用用户“点击”或“点按”,具体取决于他们是否有鼠标或触摸屏。
基本上我想做这样的事情:
if(Controls.hasMouse())
ShowMessage("Click here to continue");
else
ShowMessage("Tap here to continue");
如何检测鼠标是否连接到系统?
答案 0 :(得分:0)
我找到了问题的解决方案:
using namespace Windows::Devices::Input;
MouseCapabilities^ mcap = ref new MouseCapabilities();
bool has_mouse = mcap->MousePresent == 1;