Author: Jonas Bilinkevicius
How to get the text width and height in a TRichEdit
Answer:
1 procedure TForm1.Button3Click(Sender: TObject);
2 var3 pt: TPoint;
4 begin5 with RichEdit1 do6 begin7 pt := point(0, 0);
8 Perform(messages.EM_POSFROMCHAR, WPARAM(@pt), SelStart);
9 label1.caption := Format('(%d, %d)', [pt.x, pt.y]);
10 end;
11 end;