🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Finding a window with exact name

#5733
From: Jeff
Date: Wed, 06 Jul 2005 22:06
30 lines
1986 bytes
Thanks.

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:42cc4f0c$1@newsgroups.borland.com...
>
> "Jeff" <Jeff@nospam.com> wrote in message
> news:42cc47bf$1@newsgroups.borland.com...
>
>> Does anyone know of a method for finding a window without
>> knowing its exact caption? I've used FindWindow() before, but
>> I'm trying to find a window that has a changing title.
>
> Then you cannot use FindWindow(), unless the window has a unique class 
> name,
> in which case FindWindow() can search for that instead of the caption 
> text.
>
> Otherwise, you will have to enuerate the windows manually, looking at the
> caption of each one and doing your own comparison yourself.  Use
> FindWindow(NULL, NULL) to get the first window on the desktop, then
> GetNextWindow(GW_HWNDNEXT) in a loop to get each window after that.  Or 
> use
> EnumWindows().  Either way, you can then use the WM_GETTEXT message to
> retreive the caption of each window, then search the text for whatever you
> are looking for.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <42cc55f2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42cc47bf$1@newsgroups.borland.com> <42cc4f0c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cad48e5a1c8d424f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jeff" <Jeff@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42cc47bf$1@newsgroups.borland.com> <42cc4f0c$1@newsgroups.borland.com>
Subject: Re: Finding a window with exact name
Date: Wed, 6 Jul 2005 16:06:44 -0600
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
NNTP-Posting-Host: 198.68.195.162
Message-ID: <42cc55f2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1120687602 198.68.195.162 (6 Jul 2005 15:06:42 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail