首先在Form上放置一个RichEdit。 在窗体的构造函数中添加以下代码: __fastcall TMainForm::TMainForm(TComponent* Owner) : TForm(Owner) { unsigned mask = SendMessage(RichEdit1-Handle, EM_GETEVENTMASK, 0, 0); SendMessage(RichEdit1-Handle, EM_SETEVENTMASK, 0, mask | ENM_LINK); SendMessage(RichEdit1-Handle, EM_AUTOURLDETECT, true, 0); //自动检测URL ...
[ 查看全文 ]