views:

59

answers:

1

Is there any way to send a key press to a DirectX application using Windows API without activating its window?
I know there is a solution for simple applications, but DirectX handles this quite different...

The solution is preferred in C++, and libraries are OK.

Thanks!

A: 

Using SendInput might work, but DirectX window being not active might cause problems and DirectX application might not understand input correctly. There is code example here.

Virne
Sorry, but this doesn't work...
BlaXpirit
Did you also call AttachThreadInput?
humbagumba
No, I didn't do anything like that...
BlaXpirit