If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Get word from mouse position in Edit, RichEdit, IE home page, etc.

Hello everyone,
First of all, I must thank you for taking your time to review this article.
I want to make the feature like below.

1. move the mouse cursor over edit, richedit or IE page. Then, suppose the mouse cursor is over a word.
2. I want to get the word.

It is just the feature that many dictionary softwares have.
Can you help me how I can do it?
I am a VC++ developer. So I very appreciate if you let me know what APIs I must use. It is great if you can make me get a good sample.

Get word under mouse

Actually, after playing with it a bit more, I have a) optimized the loop, b) checked for termination characters and c) if the character under mouse is a space, return an empty string (not a word there). Here's the updated code: