I would guess that you mean something like ctrl+A? They are two separate message. When someone presses the keys on the keyboard you receive also two messages.
What you probaly have to do is sending a WM_KEYUP message as well.
Coder777: are you tell me that i need SendMessage() for 'A' and for ctrl keys?
so how i do that steps? is like SendInput()?
(my problem with SendInput() is that i can't choose the window. why these? because when i lose the focus, on window, the SendInput() will have effect on other window)
Another issue might be there is no delay. Maybe try adding Sleep(100); before doing key up. I'm not sure if this helps because I don't know what you will be using this for.
drowsysaturn: i belive you have right. but i continue with same problem:
SendInput() or SendMessage() or PostMessage() only works when the window have focus.
don't make sence that we don't have 1 function that realy calls a keyboard message, when the window don't have focus :(