SetWindowText() 修改窗口标题


{修改目标窗口标题}
//调用 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




posted @ 2012-06-02 10:10  XE2011  阅读(757)  评论(0编辑  收藏  举报