Board index » delphi » Getting List Of All Windows ( IEFrames) present

Getting List Of All Windows ( IEFrames) present

I use the following code to get the caption from the first known IEFrame
*****************************
var
Handle1 : THandle;
window : HWND;
text : pchar;
begin
Handle1 := FindWindow('IEFrame',nil);
getMem(text,255);
GetWindowText(Handle1,text,255);
listbox1.Items.Add(text);
dispose(text);
end;
*********************

What I need is something that would loop this and get the caption from every IEFrame window open in windows.(xp pro).

Thanks for any help !

Jonny[HGG]
-------
Devosia - Delphi Community
http://www.devosia.vze.com

Hellgate-guardians Clan Site
http://www.hellgate.vze.com
---------
Norton Anti-virus 2003 scanned

 

Re:Getting List Of All Windows ( IEFrames) present


On Wed, 29 Jan 2003 23:39:20 +0200, "Jonny" <jonn...@dnainternet.net>
wrote:

Quote
>I use the following code to get the caption from the first known IEFrame
>*****************************
>var
>Handle1 : THandle;
>window : HWND;
>text : pchar;
>begin
>Handle1 :=3D FindWindow('IEFrame',nil);
>getMem(text,255);
>GetWindowText(Handle1,text,255);
>listbox1.Items.Add(text);
>dispose(text);
>end;
>*********************

>What I need is something that would loop this and get the caption from =
>every IEFrame window open in windows.(xp pro).

Don't write your own loop. Use EnumWindows to cycle through all open
windows and check which of these are of interest.

--
Duncan

Other Threads