首页 > 其他 > 详细

QQ自动发送+@好友功能

时间:2017-06-05 15:31:57      阅读:327      评论:0      收藏:0      [点我收藏+]

 

 

1.取出全部标题

D2007版本

procedure TForm1.Button1Click(Sender: TObject);
var
  hCurrentWindow:HWnd;
  szText: array[0..254] of char;
  szClassName: array[0..254] of char;
begin
  ListBox1.Items.Clear;
  hCurrentWindow := GetWindow(Handle, GW_HWNDFIRST);
  while hCurrentWindow <> 0 do
  begin
    GetClassName(hCurrentWindow, @szClassName, 255);
    if (GetWindowText(hCurrentWindow, @szText, 255)>0) and
    (String(szClassName)=‘TXGuiFoundation‘) and
    (String(szText)<>‘TXFloatingWnd‘) and
    (String(szText)<>‘TXMenuWindow‘) then
      ListBox1.Items.Add(StrPas(@szText));
      hCurrentWindow:=GetWindow(hCurrentWindow, GW_HWNDNEXT);
  end;
end;

DXE10.2版本

procedure TForm1.Button1Click(Sender: TObject);
var
  hCurrentWindow:HWnd;
  szText: array[0..254] of WideChar;
  szClassName:array[0..254] of WideChar;
begin
  ListBox1.Items.Clear;
  hCurrentWindow := GetWindow(Handle, GW_HWNDFIRST);
  while hCurrentWindow <> 0 do
  begin
    GetClassName(hCurrentWindow, @szClassName, SizeOf(szClassName));
    if (GetWindowText(hCurrentWindow, @szText, SizeOf(szText))>0)
     and (String(szClassName)=‘TXGuiFoundation‘)
     and (String(szText)<>‘TXFloatingWnd‘) and
     (String(szText)<>‘TXMenuWindow‘)
    then
      ListBox1.Items.Add(StrPas(szText));
      hCurrentWindow:=GetWindow(hCurrentWindow, GW_HWNDNEXT);
  end;
end;

 

QQ自动发送+@好友功能

原文:http://www.cnblogs.com/FKdelphi/p/6944873.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!