Getting Caret Position from another process

G

Guest

Does anyone know how I can get the caret position in terms of screen position
from the currently active window? By currently active window I don't mean
just mine, rather any window.

Basically the end result I want is to position a floating tooltip style
window next to wherever the user is typing (their caret) regardless of what
app they are using.

I've tried calling GetCaretPos, however this only seems to work when my app
currently has the focus. At all other times the POINT returned by
GetCaretPos is 0,0. I think this is due to other windows destroying their
Carets when they lose the focus.

Does any smart cookies out there have any ideas?
 
G

Guest

Before calling GetCaretPos, you might want to call AttachThreadInput to
attach your thread to the thread that currently has the focus.

--mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top