function EnumerateWindows(hWnd: HWND; lParam: LPARAM): BOOL; stdcall;
var
Form1: TForm1;
implementation
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Clear;
EnumWindows(@EnumerateWindows,0);
end;
function EnumerateWindows(hWnd: HWND; lParam: LPARAM): BOOL;
var
TheText: Array[0..255] of char;
begin
{if the window does not have any text...}
if (GetWindowText(hWnd, TheText, 255)=0) then
Form1.ListBox1.Items.Add(Format('%d = {This window has no text}',[hWnd]))