Dear all,
I'm trying write a free dictionary program. I want my program suport "Click & See", but I don't know how to get text under mouse cursor using madCodeHook.
Please help me.
Thanks.
How to get text under mouse cursor using madCodeHook
You'll need to hook text output APIs like TextOutA/W, ExtTextOutA/W, DrawTextA/W etc. Then you'll need to invalidate the area under your mouse cursor and check what text output APIs get called with which text.
This will fail if the text is a bitmap instead of real text. It will also fail if the text was drawn to an internal bitmap to avoid flickering (so called double buffering). But it should work fairly nice in a lot of cases.
It's not easy to do, though.
This will fail if the text is a bitmap instead of real text. It will also fail if the text was drawn to an internal bitmap to avoid flickering (so called double buffering). But it should work fairly nice in a lot of cases.
It's not easy to do, though.