![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
MFC Application - How to catch Keyboard and Mouse eventsIf I create "Windows Form Application" (Visual C++ .NET 2003) every thing is OK - i can catch KeyDown event from every object on form - from buttons, Labels etc. But when i create an "MFC Application", i am able to catch ON_WM_KEYDOWN event only from main window, and only if no other objects are put on the form - KeyDown event works only at the blank window... The same thing is with mouse events...
So what should I do to cath keyboard and mouse events in MFC application, while there are other objects at the form? Greetings to All. Gregory |
|
#2
|
||||
|
||||
|
You could use the function employed in key loggers...GetAsyncKeyState(int v)
http://msdn.microsoft.com/library/de...nckeystate.asp Just remember the function returns -32767 when a key with code v is pressed. Similar functions are available for checking mouse states. __________________
[b]There are times when the Phantom walks the streets as an ordinary man...this is one of those times. |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| list of the most common keyboard and mouse shortcuts for IE, Opera and Firebird | jrobbio | Computer Software Forum - Windows | 2 | 04-Sep-2003 10:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The