Re: Get a list of all open files in windowsPosted by Stefan Loeners on May 07, 2002 at 15:58:47: In Reply to: Get a list of all open files in windows posted by Patrick Levy on May 05, 2002 at 03:05:05: function EnumWindowsFunc(Handle: THandle; List: TStringList): boolean ; stdcall; var Caption: array[0..256] of Char; begin if GetWindowText (Handle, Caption, SizeOf(Caption)-1) <> 0 then List.Add(Caption); end; procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Clear; EnumWindows(@EnumWindowsFunc, LParam(Memo1.Lines)); end; |
|