Click to See Complete Forum and Search --> : What API do I use to discover what text is selected in another app?


JohnnyReilly
February 4th, 2000, 07:19 AM
I am trying to discover what API can be used to retrieve the selected text in another application. The closest one I have found is EM_GETSELTEXT which only returns richedit text rather than all types.

Please help - I've exhausted all other avenues.

Thanks John

fValli
February 28th, 2000, 05:26 PM
Actually you were pretty close, use EM_GETSEL instead of EM_GETSELTEXT.
From SDK
"The EM_GETSEL message retrieves the starting and ending character positions of the current selection in an edit control. You can send this message to either an edit control or a rich edit control."

Bye

Fabian