How can send interrupt to windows of a particular key press :eek:
Printable View
How can send interrupt to windows of a particular key press :eek:
I believe you meant to post this in the windows board. If I'm understanding your one-sentence description right, it sounds like you want to know when a key is pressed. This depends on if you are trying to capture the key from any program (use System Wide Hooks) or for just one particular program. If you are looking to check for keypresses inside your own program, it's alot easier and you should be able to search for examples.
no actually like on screen keyboard I want to make programm to send keyboard interrupts
Try looking up SendMessage() windows API function.
SendMessage(HWND, MESSAGE, WPARAM, LPARAM)
is the syntax I believe.
HWND should be the handle to the window
MESSAGE should be a predefined constant pertaining to what message you are sending (this would have to do with key press. Look up what message is given for pressing a button and put it here).
WPARAM and LPARAM depend on the message you send. One of these will be the code to which key you want to send.
keybd_event()
SendInput
well I also searched and got keybd_event()
But it has limitation If user presses any key it will over ride it