Is there any way to get coordinates of a rectangle used to highlight text (such as when you select a piece of text for example with mouse for further copying to clipboard) from a third party application?
I guess it won’t be possible when application does some custom rendering, but what about standard controls? There seems to be some central way for drawing the highlighting rectangle, but I couldn’t find any useful information about this. Also clipboard interception doesn’t seem to return such info.
You can use EM_GETSEL to get the selection range in characters, then EM_POSFROMCHAR to get the coordinates of each character as displayed in the edit control’s client area.