Article View: borland.public.cppbuilder.nativeapi
Article #1800Re: EnumWindows etc.
From: Matthew
Date: Sat, 09 Jun 2007 23:26
Date: Sat, 09 Jun 2007 23:26
57 lines
2881 bytes
2881 bytes
Bob Gonder wrote:
>I don't think so.
>How are you calling EnumProc?
void __fastcall TFormMain::SpeedButton4Click(TObject* /*Sender*/)
{
long lp=0;
ListBox1->Enabled=true;
ListBox1->Clear();
EnumWindows((WNDENUMPROC)EnumProc,lp);
}
The EnumWindows function is transferred to EnumProcs (see
my former posting to Ed where I include that block of code).
First - Bob, Ed - thanks you both for being patient with my
questions and lack of API understanding. I'm sure I keep
repeating what I need - but one more time. I need a simple
list of running apps, and the ability to automate withing
my code their status = e.g. if they are minimized, maximized
or focused.
So if I had a single instance of notepad, one of mspaint,
and one of calculator, and they were all minimized, I want
my program (upon execution) to search for 'notepad' and
then to maximize that instance.
>> I don't want to see the procs in my list,
>
>Can you show us the results you are getting?
This is a small portion of the output data:
PID Caption of Window Window Class Name
3000 CodeGuard Log TCodeguardLog
3000 Project Manager TProjectManager..
3000 Align TAlignPalette
3000 C++Builder 6 TApplication
1788 ITouchWin AfxFramOrView32
3908 NewsgroupArticleBor... MSInternetExplo..
Note that out of this list I would only want two in my
final list - those being C++Builder 6 (an application), and
Windows IE (another application that I'm currently using
to write this message to the news group).
The list is quite long - I'm guessing about 150 items... even
though right now I only have four apps on the task bar.
Thanks again for everything. I have you suggestions saved
in my development logs...
Matthew.
Technical Details
Message-ID:
<466b3731$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4668d902$1@newsgroups.borland.com> <l2ri63pmm23tsci1u4subhitr6cchmm147@4ax.com> <4669fbaf$1@newsgroups.borland.com> <466aacf2$1@newsgroups.borland.com> <466aefff$1@newsgroups.borland.com> <qv8m63tas5rfgst14335o6n7oj115oalvs@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,859e738ad5fa0eae X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Matthew" <atomkey@yahoo.com> Sender: "Matthew" <atomkey@yahoo.com> Reply-To: "Matthew" <atomkey@yahoo.com> Subject: Re: EnumWindows etc. Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 74.196.1.72 References: <4668d902$1@newsgroups.borland.com> <l2ri63pmm23tsci1u4subhitr6cchmm147@4ax.com> <4669fbaf$1@newsgroups.borland.com> <466aacf2$1@newsgroups.borland.com> <466aefff$1@newsgroups.borland.com> <qv8m63tas5rfgst14335o6n7oj115oalvs@4ax.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <466b3731$1@newsgroups.borland.com> Date: 9 Jun 2007 16:26:41 -0700 X-Trace: newsgroups.borland.com 1181431601 207.105.83.66 (9 Jun 2007 16:26:41 -0700) Lines: 57 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail