>I've got a problem getting the window handle of MDI child forms on my
>application. I was doing this:
>
>With FindWindow() I was getting the main form's handle and then, with
>FindWindowEx() I was getting the child form's one. But, while using
>toolBar controls (the ones from VFP, not the OCX) it does not work.
>Browsing the windows tree with the Spy++ I realiced that, when using
>toolbars, the windows tree changes it's structure and VFP does not
>handles it properly: if I have a commandButton on my main MDI form
>and a tool bar docked un the upper side of the form, I'm not able to
>click the button. But that's not a problem by now... what I want is a
>non-failing way to retrieve a child form's window handle.
>
>Thanx
Hi David,
Use the following:
SET LIBRARY TO FOXTOOLS
<PRE>lnwhandle = _WFindTitl(< the form's caption >)
lnwhandle = _WOnTop()
lnhwnd = _WhTohWnd(lnwhandle)
The first call gets the internal reference that VFP uses (either via _WFindTitl() or _WOnTop()). The second converts it to a window handle.
BTW, I have no idea what's going on with the parser here.
George
Ubi caritas et amor, deus ibi est