kryton9
14-05-2007, 07:40
Since we use the Escape key to terminate our programs usually. I was trying to send a key press so simulate the user pressing ESCAPE
to then start the termination of my application and to cleanup before doing so. Just as when then user presses the Escape key.
I put this where I wanted to simulate the escape key press, but it doesn't work. Any ideas?
hwnd is my windows handle.
I also tried %WM_KEYDOWN, and it didn't work either.
SendMessage(hwnd, %WM_KEYUP, %VK_ESCAPE, 0)
Thanks.
to then start the termination of my application and to cleanup before doing so. Just as when then user presses the Escape key.
I put this where I wanted to simulate the escape key press, but it doesn't work. Any ideas?
hwnd is my windows handle.
I also tried %WM_KEYDOWN, and it didn't work either.
SendMessage(hwnd, %WM_KEYUP, %VK_ESCAPE, 0)
Thanks.