Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for _GlobalToLocal VFP API function
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00062394
Message ID:
00071552
Views:
41
>I'm trying to find a way to get to the _GlobalToLocal VFP API function directly from VFP, i.e. without the need for a C/C++ compiler. Unfortunately this is not one of the VFP API functions exposed by FOXTOOLS.FLL. Please note the the similar Win32API functions for converting coordinates between the Windows desktop and a window's interior are NOT what I'm after, because these do not use the same intra-window coordinate system as VFP. The difference is that VFP's toolbar docking effects are not recognized by the Win32API functions (ClientToScreen and ScreenToClient). There seems to be no easy, general way to do this coordinate transformation with any standard VFP-callable functions or PEMs. If you know of a DLL or FLL that exposes _GlobalToLocal, I would really appreciate a tip about how to find it.

Michael,

After doing some research into the FOXTOOLS library, I believe I've found a function that will do the trick. Try this, first get the window handle using _WFindTitl and _WHToHwnd functions. Once you have that, use the following:

STORE 0 TO lnTop, lnLeft, lnRight, lnBottom
* lnHwnd is the window handle
_GetWRect(lnHwnd, @lnTop, @lnLeft, @lnBottom, @lnRight)

the values returned will be the absolutes coordinates. In other words, based on the Windows desktop.

hth,

George
George

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

Click here to load this message in the networking platform