Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the handle of an untitled FoxPro window ?
Message
 
To
30/06/1998 17:13:18
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00112915
Message ID:
00113308
Views:
35
>>If the window is the foremost, _WOnTop() (in Foxtools) will return the whandle. If you need the window handle use _WhTohWnd() passing in the whandle.
>
>Tx, George. Indeed _WhToHwnd(_WOnTop()) does the trick, but it requires to activate the window before calling my FLL function. I was hoping to be able to pass it as an argument from my FoxPro application...

Noel,

The problem is that VFP has a number of window handles (something like 8 if you start VFP with just the standard tool bar and command window). So finding the right one, if it doesn't have a caption, is, at best, a tricky proposition. I can tell you this, the window will be a child of the VFP desktop window. This is not the value returned by MainhWnd() in Foxtools. The desktop is a child of that window. The earliest that you can retrieve the value is in the .Load event. If you make the window handle a property of the form, you can use _WhTohWnd(_WOntop()) there and pass that value to the function.

Just out of curiousity, may I ask what you're trying to do?

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform