测试: 函数代码: function FindWindowXG(strClass, strTitle: string): THandle; var hd: THandle; arrClass: ..] of Char; arrTitle: ..] of Char; wClass, wTitle: string; begin hd := GetWindow(Application.Handle, GW_HWNDFIRST); do begin GetClassName(hd, @arrClass[…