Pomóżcie bo nijak ni rozumiem...
Robię jak Pan Bóg przykazał:
function EnumWindowProc(uchwyt:HWnd;P:Pointer):boolean;stdcall;
var
winname:array[0..144]of char;
begin
result:=true;
getwindowtext(uchwyt,winname,144);
if IsWindow(uchwyt) then
if IsWindowEnabled(uchwyt) then
if IsWindowVisible(uchwyt) then
Form1.ComboBox2.Items.Add(strpas(winname));
end;
i dalej:
EnumWindows(EnumWindowProc,nil);
i otrzymuję:
unit1.pas(432,15) Error: Wrong number of parameters specified for call to "EnumWindowProc"
unit1.pas(99,10) Hint: Found declaration: EnumWindowProc(LongWord,Pointer):Boolean; StdCall;
co jest nie-tak?
natomiast w przypadku tej funkcji:
function EnumWindowsProc(WHandle: HWND; LParM: LParam): Boolean;StdCall;Export;
var Title,ClassName:array[0..128] of char;
sTitle,sClass,Linia:STRING ;
begin
Result:=True;
GetWindowText(wHandle, Title,128);
GetClassName(wHandle, ClassName,128);
sTitle:=Title;
sClass:=ClassName;
if IsWindowVisible(wHandle) then
begin
Linia:=sTitle+' '+sClass+' '+IntToHex(wHandle,4);
Form1.ComboBox2.Items.Add(Linia);
end;
end;
mam tak:
unit1.pas(432,29) Error: Identifier not found "EnumWindowProc"