如何实现远程控制应用程序?
大家好,
现在我想实现一个远程控制应用程序,然后我谷歌它。我发现 SendMessage、FindWindow 和 GetDesktopWindow 可以帮助我做一些基本的事情。我在 Visual Studio 2010 Experess 中编写了一些测试代码,然后在 Win7 中运行该应用程序。代码如下:
::SendMessage(::GetDesktopWindow(), WM_MOUSEMOVE, (WPARAM)0, LPARAM(0));
我只想向桌面发送一条消息并将光标移动到位置 (0, 0)。但是,光标根本没有移动。
我认为是光标移动生成了 WM_MOUSEMOVE 消息。我想要的恰恰相反。那我该怎么办,有什么SDK API可以帮我完成各种光标移动和点击操作吗?
谢谢。
Hi all,
Now I want to implement a remote control application, then I google it. I found SendMessage, FindWindow and GetDesktopWindow can help me do something basic. I write some test code in Visual Studio 2010 Experess, then run the application in Win7. Code looks like:
  ::SendMessage(::GetDesktopWindow(), WM_MOUSEMOVE, (WPARAM)0, LPARAM(0));
I just want to send a message to the desktop and move the cursor the position (0, 0). However, the cursor doesn't move at all.
I think it's the cursor movement that generates the WM_MOUSEMOVE message. what I want is just oppsite. So what should I do, can any SDK API help me finish the cursor movement and the click operation of every kind?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SetCursorPos 就是您要寻找的,我认为。
SetCursorPos is what you're looking for, I think.