开发者

Send mouse/key events to program

Hey, I'm developing application and want to simulate mouse/keyboard events in other program (game). Now I'm using SendMessage() api to simulate those events. The problem is i cant do anything on computer meanwh开发者_如何转开发ile. So I was thinking if its possible to send those events to program thats running in background so it doesnt have to be active window. Is that even possible or should i just run this in virtual machine?


I think you want Post Message.

Paul DiLascia has written a great article http://msdn.microsoft.com/en-us/magazine/cc301431.aspx There could be other reasons. But Posting is probably better, and not flooding the message Q.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜