I need to write an application that can highlight found text in active window of some process (as Text Spotlight tool). For example, I need to highlight text "abcd", so if current window is Excel, then all substring with "abcd" I need to highlight. The same effect is expected for WordPad, Skype etc.
I found way:
1. Hook active window change.
2. Find RichEdit class in this window and send message to this control.
3. Find Excel7 and _WwG windows of MS Office applications and invoke some methods from IDispatch.
The common problem - I think, that my way not good, because in this case I need to create special hooks for some process (one for Word, one for Excel etc). Maybe exists some universal way?
Thanks for any answers!