🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.nativeapi
Article #12186

Re: Count Window Handles

#12186
From: Jon Jacobs
Date: Fri, 22 Nov 2002 23:55
19 lines
1751 bytes
Thanks!

"Michael Winter" <delphi.net@gmx.net> wrote in message
news:3ddea733@newsgroups.borland.com...
> Jon Jacobs schrieb:
> >
> > How can my app count the total number of window handles my app is using
at a
> > given moment?
>
> If you know all threads in your process that can create windows, and you
> know their thread IDs, use EnumerateThreadWindows to get the top level
> windows. Otherwise use EnumWindows (or GetWindow), and select only these
> which belong to your process (GetWindowThreadProcessId).
>
> Once you have that list you can simply use EnumChildWindows recursively
> (sp?) (or GetWindow) to get all their child winodws, too.
>
> -Michael
Technical Details
Message-ID: <3ddec3ff@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail
References: <3dde725c$1@newsgroups.borland.com> <3ddea733@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f94dd,b3833ed4205b8ecf
X-Google-Attributes: gidf94dd,public
X-Google-ArrivalTime: 2002-11-22 16:15:56 PST
Reply-To: "Jon Jacobs" <jqjacobs@gte.net>
From: "Jon Jacobs" <jqjacobs@gte.net>
Newsgroups: borland.public.delphi.nativeapi
References: <3dde725c$1@newsgroups.borland.com> <3ddea733@newsgroups.borland.com>
Subject: Re: Count Window Handles
Date: Fri, 22 Nov 2002 17:55:45 -0600
Lines: 21
Organization: Intuit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 198.31.208.44
Message-ID: <3ddec3ff@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1038009343 198.31.208.44 (22 Nov 2002 15:55:43 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail