Hi Bo,
Thanks once again for this. I've tried your
nTLen = SendMessage_C(THISFORM.Title_Olecontrol1.hWnd, 1119, REPLICATE(CHR(0),8), 0)
approach and it seems much faster, and makes the form much more repsonsive. However, the number it returns is puzzling. It seems to bear no obvious relation to either the length of displayed text, or the length of the control source memo field
For an RTF control displaying 26 characters of text, and with a total (text+RTF tags etc) length of 379 characters, the above line gives nTLen=261.
I had a look on MSDN - does EM_GETTEXTLENGTHEX need a Unicode RTF control to work properly? Or is there another answer?
Cheers
John
Dr. JW Faithfull
Curator in Geology
Hunterian Museum
University of Glasgow
Glasgow G12 8QQ
Scotland