将关键事件发送到另一个打开的应用程序 [英] Send key events to another open application
本文介绍了将关键事件发送到另一个打开的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须将键盘和鼠标事件发送到另一个打开的应用程序.
I have to send keyboard and mouse events to another opened application.
推荐答案
尽管这是一个令人恐惧的问题,但与代码项目提出的建议相反,我将进行拍摄,并假设您要使用其UI自动执行某些应用程序.
看看 this [^] .在您查看时,请查看
Although a horrifyingly formed question, in a way contrary to everything suggested by The Code Project, I''ll take a shot and I''ll assume you want to automate certain applications using their UI.
Take a look at this[^]. And while you''re at it, take a look at this[^] too
CWnd* pTargetWnd = FindWindow( 0, _T( "TestDrive2" ));
::SendMessage( pTargetWnd->m_hWnd, WM_RBUTTONDOWN, 0, 0 );
这篇关于将关键事件发送到另一个打开的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文