karen021897
asked on
get all windows caption list
- how can i get into string array all windows caption list
e.g
i have 'notepad' , 'delphi 4' , 'calculator' opens on my computer
and i want to get the window title into string array e.g
'Untitled - Notepad'
Thanks
Karen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You are the man!!!
Thanks
Karen
Thanks
Karen
Unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
ListBox1: TListBox;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
function EnumWindowsCallBack(HWND: hwnd;LPARAM : lParam):bool stdcall;
var
capt:array[0..79] of char;
ClassName:array[0..79] of char;
begin
result:=true;
GetWindowText( HWND, capt, 79);
GetClassName(HWND,ClassNam
Form1.Listbox1.items.add(c
end;
procedure TForm1.Button1Click(Sender
begin
Listbox1.Items.clear;
EnumWindows(@EnumWindowsCa
;end;
end.
Good luck!!