September 9th, 2003, 04:39 AM
SetFocus to a control in a different Process
I am trying to find out if a control can get focus. I.E Is not blocked by another dialog (Modal dialog). I am calling SetFocus in the hope that it would give me the information i need, it doesn't. because the control is another process hence a different thread to the caller. MSDN say's this function is only successful when the caller is in the same thread as the control. Just wanted to know if there was a way i can get the information i need from the control.
Thanks in advance.
September 9th, 2003, 01:24 PM
You probably need to ask this question in a Microsoft specific programming board since it doesn't really have anything to do with any of the C-languages, even though you may be programming it in C, C++, or C#.
September 9th, 2003, 02:07 PM
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
September 10th, 2003, 02:12 AM
Yeah, Looks like the control has been subclassed and told not to allow that kind of operation.
September 10th, 2003, 05:50 AM
I am going to have to use BM_CLICK with SendMessage and look at the return val of the call to see if it could click the control. If i cant i am going to have to assume that the control or it's parent is blocked. Thanks for the help people!!
September 10th, 2003, 06:25 AM
Just make a global variable with the other HWND, and then set focus. That's what I do :p (I know, bad programming habbits :p)