标签:form shift from hand char font end csdn 字符
procedure TForm1.RichEdit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
vPoint: TPoint;
begin
if Button <> mbRight then Exit;
vPoint := Point(X, Y);
X := SendMessage(RichEdit1.Handle, EM_CHARFROMPOS,0,
Integer(@vPoint)) and $0000FFFF;// 得到鼠标点击字符位置
if (X >= RichEdit1.SelStart) and
(X <= RichEdit1.SelStart + RichEdit1.SelLength) then
ShowMessage(RichEdit1.SelText);
end;
http://blog.csdn.net/zswang/article/details/1556321
RichEdit选中文字右键菜单的实现
标签:form shift from hand char font end csdn 字符
原文地址:http://www.cnblogs.com/findumars/p/6347947.html