I'm sort of new to c++. I'm trying to send a key to another application, which I know the HWND of. I was thinking of doing ::SendMessage but I'm not sure what parameters to use. I'm trying to send the space key. Thanks.
+2
A:
You want to send the WM_CHAR message with the space key character code as the wParam parameter:
SendMessage(
hWnd,
WM_CHAR,
' ', // space
0);
zdan
2009-09-11 00:43:14