var
  Buff: PChar;
  xx: Integer;
begin
  Buff := PChar(AllocMem(MAX_PATH));
  xx := MAX_PATH;
  SendMessage(hwnd,WM_GETTEXT,xx,Buff);
  ShowMessage(Buff); //看看有没有
  //记得给Buff解脱 :-)
end;

解决方案 »

  1.   

    楼上的老兄:
      提示错误
      [Error] UEnum.pas(91): Incompatible types: 'Integer' and 'PChar'
      

  2.   

    呵呵,我忘了SendMessage的原型了
    要不,你试试SendMessage(hwnd,WM_GETTEXT,Buff,xx);
      

  3.   

    var
      Buff: PChar;
      xx,dd: Integer;
    begin
      Buff := PChar(AllocMem(MAX_PATH));
      xx :=WPARAM(2000);
      dd :=LPARAM(buff);
      SendMessage(edit1.handle,WM_GETTEXT,xx,dd);
      ShowMessage(Buff);end;
      

  4.   

    把分给我斑竹会误会的,给人家 CoolSlob(我回来看你们啦~~) 和lizhenjia(暴雪) 吧