Article View: borland.public.delphi.nativeapi
Article #12176Re: Count Window Handles
From: Michael Winter
Date: Fri, 22 Nov 2002 21:41
Date: Fri, 22 Nov 2002 21:41
14 lines
1507 bytes
1507 bytes
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:
<3ddea733@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mailReferences:
<3dde725c$1@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 14:15:47 PST Date: Fri, 22 Nov 2002 22:41:32 +0100 From: Michael Winter <delphi.net@gmx.net> X-Mailer: Mozilla 4.51 [de]C-CCK-MCD QXW03200 (Win98; I) X-Accept-Language: de,en MIME-Version: 1.0 Newsgroups: borland.public.delphi.nativeapi Subject: Re: Count Window Handles References: <3dde725c$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Hamster/1.3.23.205 NNTP-Posting-Host: 145.254.208.154 Message-ID: <3ddea733@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1038001971 145.254.208.154 (22 Nov 2002 13:52:51 -0800) Lines: 14 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail