{修改目标窗口标题}
//调用 SetWindowTextA('Form1','HellWord');
function SetWindowTextA(oldtext:string;newtext:string):Boolean;
var h:HWND;
begin
Result:=false;
h:=Findwindow(nil,Pchar(oldtext));//PansiChar=Pchar
setWindowText(h,Pchar(newtext));
if h <> 0 then Result:=True;
end; //SetWindowText
//声明:
SetWindowText(
hWnd: HWND; {窗口句柄}
lpString: PChar {新标题串指针}
): BOOL