Click to See Complete Forum and Search --> : How to generate system level input message, such as keyboard and mouse?


August 25th, 1999, 10:31 PM
Hi, all,
My programme have to generate the system level keyboard message and mouse message, such as type some key, mouse move, mouse clike, etc. How to generate them?
Note they should be system level, that means these message could be dispatched to the system, not only just a active programe.

ravish
August 25th, 1999, 11:27 PM
Use SendMessage function to send messages(or PostMessage to post to the message Queue)
WM_KEYUP and WM_LBUTTOBCLICK (refer similar messages) are used to simulate the inputs.
Use PostMessage with parameter as HWND_BROADCAST to post to system
Ravi