>>but for some reason it only works if it is on top
Strictly speaking these messages can only be send/processed when the control has focus. Most programs don't bother to check (like me), but some do. Do a SetFocus(hWnd) before sending anything.
Secondly to simulate input the *correct* way is to use the SendInput() procedure which actually sets the input through the keyboard driver/buffer system. I suspect that the GetKeyState() function is NOT returning the shift status and so not seeing Shift+Up.
See Simulating Input at http://msdn.microsoft.com/
HTH
Main Topics
Browse All Topics





by: robert_marquardtPosted on 2006-02-14 at 22:47:49ID: 15958152
Show some code.