savkic, ako ti nije problem, da mi to malo pojasniš.
Ovako dobijem handle forme:
Code:
function EnumProcess(hHwnd: HWND; lParam : integer): boolean; stdcall;
var
pPid : DWORD;
title, ClassName : string;
begin
if (hHwnd=NULL) then
begin
result := false;
end
else
begin
GetWindowThreadProcessId(hHwnd,pPid);
SetLength(ClassName, 255);
SetLength(ClassName,
GetClassName(hHwnd,
PChar(className),
Length(className)));
SetLength(title, 255);
SetLength(title, GetWindowText(hHwnd, PChar(title), Length(title)));
if leftStr(title, 5) = 'Nesto' then
Form1.listbox1.Items.Add
('Class Name = ' + className +
'; Title = ' + title +
'; HWND = ' + IntToStr(hHwnd) +
'; Pid = ' + IntToStr(pPid));
Result := true;
end;
end;
Kako da sada napravim EnumChildWindows forme ako imam njezin handle?
Hvala!
F