tags:

views:

31

answers:

1

Is there any way to see if the contents of a 'window' have changed, that is referenced only by a handle? Such as one obtained from a pinvoke FindWindow?

+1  A: 

If you want to be notified that the text changed, then no. Some windows send notifications of changes to their parent windows, but you would have to be in the process to intercept those messages, and not all windows even send notifications. (I presume by the fact that you are using FindWindow that you are not in-process)

If you want to get the text and check for yoursef, you can do that with a pinvoke to GetWindowText or to SendMessage(hwnd, WM_GETTEXT, ...); (GetWindowText is just a helpful wrapper around a SendMessage)

John Knoeller