WM_SETFOCUS?
-
hey guys, having a little trouble here... what im trying to do is set focus to an Edit field on a different application... so im doing this, to test im using Spy++ to get the handle to a random field on a random application, Handle: 2692780
SendMessage(hWnd, WM_SETFOCUS, IntPtr.Zero, null);
it doesnt seem to be working :( ideally what i want is to bring focus to the entire process, and focus the control... am i on the right track here? -
hey guys, having a little trouble here... what im trying to do is set focus to an Edit field on a different application... so im doing this, to test im using Spy++ to get the handle to a random field on a random application, Handle: 2692780
SendMessage(hWnd, WM_SETFOCUS, IntPtr.Zero, null);
it doesnt seem to be working :( ideally what i want is to bring focus to the entire process, and focus the control... am i on the right track here?Hi! The documentation for
WM_SETFOCUS
states that this is a notification that's being sent to a window when it's receiving the focus, it doesn't actively set the focus! How about using SetFocus()[^]?Regards, mav -- Black holes are the places where god divided by 0...