开发者

Getting the keyboard cursor location/coordinates in all applications

开发者 https://www.devze.com 2023-01-22 03:14 出处:网络
Right now I\'m using the functions GetCaretPos() and GetGUIThreadInfo() to get the current keyboard cursor/caret coordinates. These work properly in applications like Notepad and Wordpad and return开发

Right now I'm using the functions GetCaretPos() and GetGUIThreadInfo() to get the current keyboard cursor/caret coordinates. These work properly in applications like Notepad and Wordpad and return开发者_StackOverflow the correct coordinates, but in applications such as Firefox, Thunderbird, and others, the coordinates returned are always 0, 0, no matter where the keyboard cursor is.

I know it's not impossible to get the keyboard cursor/caret coordinates in these applications because when I use the Yahoo KeyKey IME in them, it pops-up a dialog right where the keyboard cursor is positioned.

Problem is, since KeyKey is not open source, I have no idea how it's doing it.

If anyone could point me in the right direction or knows the correct function(s) to use it'd be much appreciated!

0

精彩评论

暂无评论...
验证码 换一张
取 消