in reply to Win32::API? I need to get the caret postion; never did any Win32 programming before

There is an API call to GetCaretPos(), but it is doubtful if it will be helpful to you.

Each Win32 application (actually each message queue, but that's usually one to one), has it's own caret, and calling the API returns information applicable to the calling application. Ie. calling from Perl, which has a message queue, but doesn't use carets, it succeeds but always returns ( 0,0 ). This is true even if you arrange to have some other application brought to the top and be given the input focus before teh api is called.

If you are trying to hook keystrokes, you are going to have to learn a great deal (more) about Win32 programming.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re: Win32::API? I need to get the caret postion; never did any Win32 programming before