Mam następującą funkcję:
[code]var
Form1: TForm1;
h,i:integer;
x,y,z:integer;
P,w,r:Integer;
implementation
function EnumWindowProc(uchwyt:HWnd;Pointer):boolean;stdcall;
var
winname,cname:array[0..144]of char;
begin
result:=true;
if getwindowtext(uchwyt,winname,144)>0 then
begin
if iswindowvisible(uchwyt)=true then
form1.listbox1.items.add(strpas(winname)); //jezeli okno jest widoczne to dodaj do listbox1
if iswindowvisible(uchwyt)=false then // jezeli okno nie jest widoczne to dodaj do listbox2
form1.listbox2.items.add(strpas(winname));
end;
end;
[/code]
robie sobie odwolanie w timerze
procedure Tform1.Timer1Timer(Sender: TObject);
var uchwyt:hwnd;
p:pointer;
begin
EnumWindowProc(uchwyt,p);
end;
hmm i nie działa, nie wiem dlaczego- a w koncu ma dodawac do listboxow dane
Dlaczego nie dodaje nic do listboxow ?? Co jest nie tak ??