Click here to Skip to main content
15,905,504 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used SetWindowsHookEx, but I cannot get which KB/mouse the events are coming from in my KeyboardProc and MouseProc callback functions.

Does anyone know how I can do that?
Posted
Comments
Sergey Alexandrovich Kryukov 21-Feb-11 0:55am    
Do you understand you right: the problem is you have more then one keyboard and more then on mouse; you need to tell which one?
Everything else comes in notification.
--SA

May I know why do you want to identify the particular keyboard or mouse. As with Keyboardproc and MouseProc, there ia no way to know the info. you want.
 
Share this answer
 
Comments
micard 28-Feb-11 22:12pm    
i need this because i need to identify which keyboard is typing (for example i have two KBs)
Sergey Alexandrovich Kryukov 8-Mar-11 4:55am    
Your answer is: I need to identify keyboard because I need to identify keyboard...
How about real answer? I'm interested, too.
Why did you duplicate the Question? It won't help...
--SA
Perhaps you mean the window the message is sent to!?
You should use: GetFocus(), GetCapture() and WindowFromPoint().
Regards.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900