I'm doing a universal text auto completer application in C#. So I need to get the caret position in the currently active window (it may be Notepad, Ms Word etc). What should I do to get the X,Y coordinates of the caret? I need it to display suggestions under the cursor (caret) while the user is typing.
My program is running in the background. It should detect the presence of caret in whatever window currently active and get the real time location of caret. Location value should update whenever the user enter text.
I don't know how to do all these. Is this all possible using C#? Or should I change the programming language?