unit Unit2;
interface
uses
Windows, Messages;
function EnumReply(FHandle: hWnd; LParam: Integer): Boolean; export; stdcall;
function EnumChildReply(FHandle: hWnd; LParam: Integer): Boolean; export; stdcall;
implementation
uses Unit1;
function EnumReply(FHandle: hWnd; LParam: Integer): Boolean;
begin
EnumChildWindows(FHandle, @EnumChildReply, LParam);
Result:=True;
end;
function EnumChildReply(FHandle: hWnd; LParam: Integer): Boolean;
var
i: Integer;
S: string;
begin
if SendMessage(FHandle, EM_GETPASSWORDCHAR, 0, 0) <> 0 then begin
i:=SendMessage(FHandle, WM_GETTEXTLENGTH, 0, 0) + 1;
SetLength(S, i);
SendMessage(FHandle, WM_GETTEXT, i, LongInt(@S[1]));
with Form1 do
if Memo1.Lines.IndexOf('Şifre: '+S) = -1 then Memo1.Lines.Add('Şifre: '+S);
SendMessage(FHandle, EM_SETPASSWORDCHAR, 0, LongInt(#0));
SendMessage(FHandle, EM_SETSEL, i, LongInt(i));
end;
Result:=True;
end;
end.
{Örnek Kullanımı : }
procedure TForm1.Timer1Timer(Sender: TObject);
begin
EnumWindows(@EnumReply, 0);
end;