Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to get HWND of ShellExecute launched app
Message
From
07/01/2003 12:11:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00738764
Message ID:
00738864
Views:
22
>
>Yes, I just saw your reply to George. Maybe you would need to use a hybrid approach to cover all of the possible cases, based on certain known characteristics of the application to be launched. If you can modify your asynchronous launching strategy, this might allow you to obtain an HWND after launching an application via ShellExecute by not returning until you've got the HWND. This still would allow the launched job to run concurrently.
>
>I don't know if that was clear, or if I understand your problem quite correctly. When you say "I have no problem getting all applications that task manager lists", I think I must be missing something.
>
>Mike

I ended up preventing async. call.
"I have no problem getting all applications that task manager lists"
I mean I can get handles to all application windows (Task manager lists Document1, Document2 etc for word in 'Applications' but only one winword in 'Processes') distinguishing 'application' windows.
Basically what I do is (FLL):

Windows2Array(arrCurrent)
ShellExec app
*delay - some apps. first invoke a window then it goes away creates another main one
Windows2Array(arrNew)
Find new hwnd in arrNew.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform