通过FindWindowEx来获取当前运行着QQ号码列表.docxVIP

  • 27
  • 0
  • 约小于1千字
  • 约 2页
  • 2017-08-19 发布于北京
  • 举报

通过FindWindowEx来获取当前运行着QQ号码列表.docx

通过FindWindowEx来获取当前运行着的QQ号码列表以下为封好的 Delphi 类typeTGetQQNumber = classqqlist: TStrings;privateprocedure GetList(ClassName:String);publicconstructor Create();destructor Destroy(); override;end;constructor TGetQQNumber.Create;beginqqlist := TStringList.Create;// Afx2 为窗口类名GetList(Afx2);//QQ2006 STDGetList(Afx2);//QQ2007 Beta3GetList(Afx2);//按规律随意添加的,不知道对不对GetList(Afx2);//按规律随意添加的,不知道对不对GetList(Afx2);//按规律随意添加的,不知道对不对GetList(Afx2);//QQ2007 Beta4end;destructorTGetQQNumber.Destroy;beginqqlist.Free;end;procedure TGetQQNumber.GetList(ClassName: String);varWnd: DWord;Buf: array[0..255] of char;i: integer;beginWnd := 0;repeatWnd := FindWindowEx(0, Wnd, pchar(ClassName), nil);GetWindowText(Wnd, Buf, 255);if buf thenbeginfor i := 0 to 255 dobeginif Buf[i] = _ thenbeginBuf[i] := #0;break;end;end;qqlist.Add(buf);end;until (Wnd = 0);end;

文档评论(0)

1亿VIP精品文档

相关文档