Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need to get the list of applications working
Message
From
16/11/2001 08:10:06
 
 
To
16/11/2001 04:22:18
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00426736
Message ID:
00582646
Views:
37
>Thank You George, that did it!
>Peter
>>>Hi!
>>>I am using a loop with GetWindow and GW_HWNDNEXT, but the window I am looking for does not come up in the list. It is visible and I can see a title bar, but it doesn't get recognized by the GetWindow loop. What else could I do to find it? I need to wait until it is done with what it is doing before I can continue in my program.
>>
>>Try retrieving the desktop window handle and use it as the first call, to retrieve the first child window at the top of the Z-Order.
DECLARE INTEGER GetDesktopWindow IN Win32API
>>DECLARE INTEGER GetWindow IN Win32API;
>>  INTEGER hwnd, INTEGER dflag
>>lnhwnd = GetDesktopWindow()
>>lnchild = GetWindow(lnhwnd, GW_CHILD) && GW_CHILD = 5
The proceed from there using GW_HWNDNEXT.

One problem here - GetWindow(), when applied to situations starting from the Desktop Window, will only show Top-Level Windows, and not the children of those Windows. Unfortunately, the best solution, EnumWindows() i not trivially implemented in VFP - it requires a callback, and as a result needs an OCX or DLL to provide the enumerator callback. There are several examples of FLLs used for such purposes in the Files section.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform