| Message: 96510 |
 |
BY: Dan Rathbun (danzoid61) DATE: 2011-05-22 21:29 SUBJECT: RE: SetForegroundWindow and FindWindow call it like this from Ruby:
pw = FindWindow.call(0,@@window_name)
ie, use 0 not nil for the class argument.
Also FindWindow will only find top windows. If you need to find child windows, you must use FindWindowEx, like:
cw = FindWindowEx.call(pw,0,"Edit",0)
.. where pw is the handle of the parent window.
(In this case, it's looking for the first edit control, in a popup dialog which is the parent window.) | |