如题
测试通过,马上给分!

解决方案 »

  1.   

    const
      n = 255;
    var
      h:THandle;
      s: array [0..n] of char;
    begin
      if not EnumWindows(@FindChatDialog, integer(@h)) then
      begin
        GetWindowText(h, s, n);
        ShowMessage(StrPas(s));
        BringWindowToTop(h);
    h:= FindWindowEx(h,0,'#32770',nil);
    h:= FindWindowEx(h,0,'AfxWnd42',nil);
    h:= FindWindowEx(h,0,'RichEdit20A',nil);
      end;
    end;
    就是取不到RichEdit20A的句柄,哪位高手帮忙?
      

  2.   

     在'#32770'有好几个AfxWnd42,上面的代码只能取到第一个,如何精确定位到我们要找的AfxWnd42上面,并取其下的RichEdit20A句柄,这对熟悉delphi的人来说,不难吧?
      

  3.   

    的确可以取到句柄
    但是你别指望可以对里面写数据
    qq对settext等消息屏蔽了
      

  4.   

    类名为“#32770”的窗体不只一个。要遍历判断。我已经留在另一贴:
    http://topic.csdn.net/u/20071229/08/f1242c70-9e78-4814-b422-8fd31b127af0.html
      

  5.   

    文字也很难取到
    GetText消息没用的
    你用spy++就知道了
    上面的聊天窗口的文字都可以出来
    但是下面的发送窗口标题总是空的