procedure EnumTabs(hWnd: Cardinal; List: TStrings); var Buffer: array [0..255] of Char;
begin
while LongBool(hWnd) do
begin
GetClassName(hWnd, @Buffer, SizeOf(Buffer) - 1);
if not LongBool(lstrcmp(@Buffer, 'TabWindowClass')) then
begin
GetWindowText(hWnd, @Buffer, SizeOf(Buffer) - 1);
List.Add(PChar(@Buffer));
end;
hWnd := GetWindow(hWnd, GW_HWNDNEXT);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
EnumTabs(GetWindow(FindWindow('IEFrame', nil), GW_CHILD), ListBox1.Items);
end;