How to recognise a specific mouse/pointing device programmatically

I wish to use a cordless mouse to remotely control an application that I have  written via the mouse wheel.
I need to disable the mouse buttons (via software) of the cordless mouse whilst retaining the functionality of the mouse wheel.
I also need however, to allow mouse clicks from any other mouse device that might be attached to the system including remote access by VNC for example.
I can do this in software if I can identify the source of the windows mouse event messages (received by the Application) so as to differentiate between mouse devices which gives rise to my question of how to identify a mouse device.
LVL 2
Roger AlcindorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ambienceCommented:
It's not clear whether you want to disable for the entire system or just the application. If you want to do that for the entire system then I would say that a Windows hook would do the job. SetWindowsHookEx for the Mouse input. There you can filter the mouse event much before any application gets to them, however that would not help much because you obviously can not detect which device the input is coming from.
I would suggest that you do look into; maybe you would like to redesign your application a bit
http://www.jstookey.com/arcade/rawmouse/
and
http://msdn.microsoft.com/en-us/library/ms645543(v=VS.85).aspx
 
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Roger AlcindorAuthor Commented:
>you obviously can not detect which device the input is coming from.

This answers my question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.