I want to write one win32 program which test any changes in windows of other application. Suppose, winodw of a running application A got repainted. I want to hook that WM_PAINT or other fitful message in my program so that I can identify that updated region of window of app A. I am thinking to use 'EnumProcess' & 'EnumWindow' to retrieve the process & window handle of running process "A". But my question is, how to catch the event occured beacuse of action on window of application A? It will be great if somebody shares suggestion with some code snippet.