Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting hWnd of a MDI child form
Message
 
To
08/02/2000 14:27:13
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00329049
Message ID:
00329072
Views:
26
>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 && You may have to include the path if it's not on it
<PRE>lnwhandle = _WFindTitl(< the form's caption >)
* optionally to get the top form
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform