mimic keypress

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
rhumba
Posts: 3
Joined: Fri Sep 14, 2007 10:57 am

mimic keypress

Post by rhumba »

Hi,
I've download Jim's source code for the WM_inputExample and its working great, I can send keypress data using sendinput() MFC stuff. However, I can't seem to get the example to respond when its window is not in focus, it only works when its forefront. This is the same when I choose to call a messagebox when the input changes (from the stick).

Is there any way to have the program respond permanently in the background, polling for new data and sending the keypress data to whichever window is currently in focus?
ngomes
Moderator
Moderator
Posts: 3344
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: mimic keypress

Post by ngomes »

Hi rhumba,
Is there any way to have the program respond permanently in the background, polling for new data and sending the keypress data to whichever window is currently in focus?
Please refer to the MSDN documentation on the RAWINPUTDEVICE structure has used in ::RegisterRawInputDevices () function.

I believe you need to set the RIDEV_INPUTSINK flag.

Note that we do not recommend that you do this. If your application is on system running other apps that also support 3D mice, then unwanted/unexpected manipulation of your app can occur when it is on the background.
Nuno Gomes
rhumba
Posts: 3
Joined: Fri Sep 14, 2007 10:57 am

Post by rhumba »

Thanks a lot for the reply, I'll give it a go!
I can't see it being a problem as I'm just writing it for personal use and I only have one navigator.
Best regards
Post Reply