I am trying to use findwindow api call in FM, I can use it find in a VCL application, but not FM.
Here is my code
function WindowExists(titlename: string): boolean;
var
hwd: THandle;
begin
hwd := 0;
hwd := FindWindow(nil, pchar(titlename));
Result := False;
if not(hwd = 0) then { window was found if not nil }
Result := True;
end;
and here is the error I get when I try to compile [dcc32 Error] global_proc.pas(62): E2010 Incompatible types: 'HWND' and 'Pointer'
What I am doing wrong?