Hello everybody,

I need the ITextDocument.GetRange(Int32, Int32) and ITextDocument.GetText(TextGetOptions, String) to retrieve a string from a RichEdit control without selecting it.

Point is my C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\TOM.h looks different. There is the ITextDocumentVtbl, but no GetText; there is, however, GetText in the ITextRangeVtbl. Only that this GetText wants only one argument, no options, and I can't get it to work.

The purpose of my search is to retrieve a string from a RichEdit control without selecting it, and without hidden text. The EM_GETTEXTRANGE message would be ok, but you can't set any options, so you get the hidden text, too.

Any ideas?

I am using msftedit.dll on Win7-64. I've used various other versions in the past, each having their own bugs and quirks. RichEdit is a horrible mess, and a shame for Microsoft.