Re: SeInfo - window handle

From: frederick (nomail_at_nomail.com)
Date: 08/06/04


Date: Fri, 6 Aug 2004 10:22:17 +1200


"Rob Kennedy" <me3@privacy.net> wrote in message
news:2nfod2FekclU1@uni-berlin.de...
> frederick wrote:
> > Is there a way to get the handle of a window created by an
application
> > started with ShellExecuteEX(@SeInfo) ?
>
> Remember that some programs don't have any windows, so whatever
solution
> you find won't be guaranteed to get a valid result. Also remember that
> ShellExecuteEx might not start any application at all -- it might
re-use
> an application that was already running -- and it won't tell you
> anything about that program.
>
> > Googling hasn't found a solution for me, but maybe I am looking for
the
> > wrong thing.
>
> I would start here:
>
>
http://groups.google.com/groups?q=shellexecuteex+window+handle&as_ugroup=*delphi*
>
> If none of the top results looked promising, I would alter the query
to
> the following since ShellExecuteEx might return a process handle.
(It's
> the process handle that you need to "convert" to a window handle; your
> question isn't limited to ShellExecuteEx.)
>
>
http://groups.google.com/groups?q=process+window+handle&as_ugroup=*delphi*
>
> --
> Rob

Thanks Rob
The first entry of the second google groups search returns an unanswered
post from 1996, that fairly neatly summarises the frustration that I
have.
I was hoping for something simple, but I don't think I am going to find
it.
The answer perhaps lies in using EnumWindows and finding the process
handle
returned by ShellExecuteEx. The fun part for me (not a happy reader of
the SDK!) is figuring out how.



Relevant Pages

  • Re: SeInfo - window handle
    ... frederick wrote: ... > Is there a way to get the handle of a window created by an application ... ShellExecuteEx might not start any application at all -- it might re-use ... If none of the top results looked promising, I would alter the query to ...
    (comp.lang.pascal.delphi.misc)
  • just looking near a case beside the forest is too closed for Donald to smell it
    ... Where will you jump the think outer bandages before Frederick does? ... Don't even try to pull simply while you're attacking ... without the window, if Willy sneakily pours the goldsmith? ... Others firmly clean. ...
    (uk.sport.football.clubs.liverpool)
  • Re: SHELLEXECUTEINFO and SHCREATEPROCESSINFOW and functions
    ... the hwnd member is the owner window passed to MessageBox or DialogBox ... ShellExecuteEx, not ShellExecute. ... SHCREATEPROCESSINFOW before calling SHCreateProcessAsUserW, then ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Maximise from another applications
    ... I'm not too familiar with ShellExecuteEx.. ... sensitive to either the class name of the window or the caption text. ... An app will have to put back ...
    (microsoft.public.vc.mfc)
  • Re: Events in a console app
    ... OK thanks Rob. ... removing them from initial component palette, but they seem to work as ... But your program doesn't have a window, ... for example would have some internal notification of when the client ...
    (comp.lang.pascal.delphi.misc)