请教 关于SendMessage和Getwindowtext的问题(22分)

  • 主题发起人 淡淡的笑
  • 开始时间

淡淡的笑

Unregistered / Unconfirmed
GUEST, unregistred user!
SendMessage(hwnd,WM_GETTEXT,1023,Integer(@buf[0]));<br>Getwindowtext(hwnd,pchar(buf),1024);<br><br>以上两个语句操作同一个句柄(某个窗口上的EDIT),为什么取得的结果不一样?<br>后一个为空(取别的窗口edit有时候会正常),前一个正常取得. 这两者有何区别?<br>
 
GetWindowText<br>This function cannot retrieve the text of an edit control in another application<br>见Windows API帮助
 
Getwindowtext 对其他进程中控件类的窗口无效,而WM_GETTEXT是通用的.
 
顶部