🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: (ATTN: Remy) Find window handle from exe file name

#13084
From: Ed Mulroy [TeamB]
Date: Sun, 26 Oct 2003 02:56
27 lines
2646 bytes
What I posted is how to identify a window from the exe file name of the
program which created the window.  The hiding and showing of the windows is
part of the test code which demonstrates the function working.

The test code is not written to work with complex situations and Internet
Explorer is about as complex as it gets.  IE has multiple top windows, some
are hidden and several are used for things other than for displaying on the
screen.  Do not expect the test code demo to work for something like IE.

If you want to use the WindowFromFile code to handle programs which create
multiple windows, you could alter it to use a vector of window handles
(HWND's) and return that.  As it is currently written it and the
EnumWindowsProc both return as soon as one of the program's windows is
found.

To cause a window to be minimized, use SW_SHOWMINIMIZED as the nCmdShow
parameter in the call to ShowWindowAsync.

.  Ed

> Martin C wrote in message
> news:3f9b215c$1@newsgroups.borland.com...
>
> sorry I didn't express my problem correctly...what I was
> trying to say by (IE Windows Remained visible) was not
> to close the IE window, I ment (Hide/Show), so IE windows
> remained visible in the taskbar...
Technical Details
Message-ID: <3f9b37c6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!skynet.be!newsgate.cistron.nl!news.cambrium.nl!news.cambrium.nl!news.cambrium.nl!news2.euro.net!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f930de8@newsgroups.borland.com> <3f930eb2$1@newsgroups.borland.com> <3f931b5b@newsgroups.borland.com> <3f99caaa@newsgroups.borland.com> <3f99d356$1@newsgroups.borland.com> <3f99e98a@newsgroups.borland.com> <3f9af35c@newsgroups.borland.com> <3f9b1ea0$1@newsgroups.borland.com> <3f9b215c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,dcd8305ed53c9568
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-25 19:57:54 PST
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f930de8@newsgroups.borland.com> <3f930eb2$1@newsgroups.borland.com> <3f931b5b@newsgroups.borland.com> <3f99caaa@newsgroups.borland.com> <3f99d356$1@newsgroups.borland.com> <3f99e98a@newsgroups.borland.com> <3f9af35c@newsgroups.borland.com> <3f9b1ea0$1@newsgroups.borland.com> <3f9b215c$1@newsgroups.borland.com>
Subject: Re: (ATTN: Remy) Find window handle from exe file name
Date: Sat, 25 Oct 2003 22:56:05 -0400
Lines: 29
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.1106
NNTP-Posting-Host: 24.74.175.102
Message-ID: <3f9b37c6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067136966 24.74.175.102 (25 Oct 2003 19:56:06 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!skynet.be!newsgate.cistron.nl!news.cambrium.nl!news.cambrium.nl!news.cambrium.nl!news2.euro.net!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail