Mega Code Archive

 
Categories / Delphi / Examples
 

Difference between wm_gettext and getwindowtext

Question: What is the difference between sending message WM_GETTEXT and calling GetWindowText()? Answer: You can send WM_GETTEXTLENGTH and WM_GETTEXT message even across processes. GetWindowText takes shortcuts, it tries to directly pass a WM_GETTEXT message to the target windows window function instead of using SendMessage. That does not work across process boundaries.