Win32 相当于 .net SendKeys
我正在设计一个从 Kinect 读取手势并执行一些操作的系统。我正在尝试包含能够将 HotKey 发送到应用程序的系统。我的系统是用 C++ 编写的,但 UI 是用 C++.net 编写的。我已经能够从 UI 部分使用 SendKeys 并且它确实有效。
是否有 Win32 等效项以便我可以在我的系统中使用它?
提前致谢!
I am designing a system that reads a gesture from Kinect and make some actions. I am trying to include the system to be able to send HotKey to an application. My system is writing in c++ but the UI is in C++.net. I have been able to use SendKeys from the UI part and it does work.
Is there a Win32 equivalent so I can use it in my system?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 WIN32 中,SendKeys 称为 SendInput:
http:// msdn.microsoft.com/en-us/library/ms646310(v=vs.85).aspx
还可以模拟鼠标移动等。
In WIN32, SendKeys is called SendInput:
http://msdn.microsoft.com/en-us/library/ms646310(v=vs.85).aspx
It can also simulate mouse movements, etc.
如果有多个应用程序,在 Vista 及更高版本上,UAC 完整性级别可能会阻止应用程序以这种方式发送/接收 Windows 消息。您可能需要调用 ChangeWindowMessageFilter, ChangeWindowMessageFilterEx 函数用于在更高提升的进程中启用消息接收。
If there are multiple applications, on Vista and higher, UAC integrity levels may prevent applications from sending/receiving Windows messages this way. You may need to call ChangeWindowMessageFilter, ChangeWindowMessageFilterEx functions to enable message-reception in higher elevated process.
本机等效项是
keybd_event
http://msdn.microsoft.com/en-us/library/ms646304(v=vs.85).aspx
The native equivalent is
keybd_event
http://msdn.microsoft.com/en-us/library/ms646304(v=vs.85).aspx