🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10931

Re: Finding a Spawned Window

#10931
From: Remy Lebeau (TeamB)
Date: Fri, 05 Mar 2004 19:25
22 lines
1674 bytes
"Mortz" <rmorteo@hotmail.com> wrote in message
news:4048c64f$1@newsgroups.borland.com...

> Hi, does anyone know how to get a window handle (HWND)
> after being spawned with "ShellExecuteEx".

Use CreateProcess() instead.  It can return the process ID for the spawned
process.  You can then use EnumWindows() and GetWindowThreadProcessId() to
find all windows that belong to that same process ID.  You are currently
trying to compare process handles instead, which is not exactly the same
thing.

> May be If I can get the Window Text form the spawned windows
> trought one member of the ShExecInfo retrieved by the call to
> ShellExecuteEx I could use "FindWindow" to get the actual window
> handle.

That information is not made avilable by ShellExecuteEx().


Gambit
Technical Details
Message-ID: <4048d25f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4048c64f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,6b6fbcbb8d2db5cb
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-05 11:40:48 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4048c64f$1@newsgroups.borland.com>
Subject: Re: Finding a Spawned Window 
Date: Fri, 5 Mar 2004 11:25:44 -0800
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <4048d25f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1078514271 67.22.138.253 (5 Mar 2004 11:17:51 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail