yq3woaini(哈哈镜(初级代码工)(★★★)) 进来接分,SQLMM (懂你)也来接点,每人50,呵呵 http://community.csdn.net/Expert/topic/3424/3424735.xml?temp=.6251642http://community.csdn.net/Expert/topic/3367/3367678.xml?temp=.5284998^_^ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 unit LinRichEdit;interfaceuses Windows, Messages, SysUtils, Classes, Controls, StdCtrls, ComCtrls;type TLinRichEdit = class(TRichEdit) private FParentWndProc: TWndMethod; protected procedure CreateWnd; override; procedure NewWndProc(var Message: TMessage); end;procedure Register;implementationuses ShellAPI, RichEdit;procedure Register;begin RegisterComponents('Custom', [TLinRichEdit]);end;{ TLinRichEdit }procedure TLinRichEdit.CreateWnd;var mask: Word;begin inherited; FParentWndProc := Parent.WindowProc; Parent.WindowProc := NewWndProc; mask := SendMessage(Handle, EM_GETEVENTMASK, 0, 0); SendMessage(Handle, EM_SETEVENTMASK, 0, mask or ENM_LINK); SendMessage(Handle, EM_AUTOURLDETECT, Integer(True), 0); Text := 'http://www.eastrise.cn/bbsxp/';end;procedure TLinRichEdit.NewWndProc(var Message: TMessage);var p: TENLink; sURL: string;begin if (Message.Msg = WM_NOTIFY) then begin if PNMHDR(Message.lParam).code = EN_LINK then begin p := TENLink(Pointer(TWMNotify(Message).NMHdr)^); if (p.Msg = WM_LBUTTONDOWN) then begin try SendMessage(Handle, EM_EXSETSEL, 0, Longint(@(p.chrg))); sURL := SelText; ShellExecute(Handle, 'open', PChar(sURL), nil, nil, SW_SHOWNORMAL); except end; end; end; end; FParentWndProc(Message);end;end. 是不是自动识别URL\EMAIL的代码。。收藏! destructor TLinRichEdit.Destroy;begin if Assigned(Parent) then Parent.WindowProc := FParentWndProc; inherited;end;看来没有人讨论其他功能了 数据库问题 如何得知程序创建了新的窗口实例,并获取该窗口实例? 再提个listview的取值问题 如何用DELPHI抓取JSP网页数据?我是新手. 高分求哪里有delphi的ppt讲义 调用储存过程为何出错 怎么取最后一条记录的值?(不用LOCATE) 摄像机VC头文件翻译 各位大哥,我在CB5中,写的组件,在CB6中用不了,出现"**组件在vcl60中也有,错误!”,怎么解决!谢谢! 几乎看遍了CSDN中关于treeview帖子,还没弄懂! 新手求助!请各位大哥推荐几本学习delphi的好书! delphi打不开文件?急急急:(各路大虾帮忙!!1
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, ComCtrls;type
TLinRichEdit = class(TRichEdit)
private
FParentWndProc: TWndMethod;
protected
procedure CreateWnd; override;
procedure NewWndProc(var Message: TMessage);
end;procedure Register;implementation
uses
ShellAPI, RichEdit;procedure Register;
begin
RegisterComponents('Custom', [TLinRichEdit]);
end;{ TLinRichEdit }procedure TLinRichEdit.CreateWnd;
var
mask: Word;
begin
inherited;
FParentWndProc := Parent.WindowProc;
Parent.WindowProc := NewWndProc; mask := SendMessage(Handle, EM_GETEVENTMASK, 0, 0);
SendMessage(Handle, EM_SETEVENTMASK, 0, mask or ENM_LINK);
SendMessage(Handle, EM_AUTOURLDETECT, Integer(True), 0); Text := 'http://www.eastrise.cn/bbsxp/';
end;procedure TLinRichEdit.NewWndProc(var Message: TMessage);
var
p: TENLink;
sURL: string;
begin
if (Message.Msg = WM_NOTIFY) then
begin
if PNMHDR(Message.lParam).code = EN_LINK then
begin
p := TENLink(Pointer(TWMNotify(Message).NMHdr)^);
if (p.Msg = WM_LBUTTONDOWN) then
begin
try
SendMessage(Handle, EM_EXSETSEL, 0, Longint(@(p.chrg)));
sURL := SelText;
ShellExecute(Handle, 'open', PChar(sURL), nil, nil, SW_SHOWNORMAL);
except
end;
end;
end;
end; FParentWndProc(Message);
end;end.
begin
if Assigned(Parent) then
Parent.WindowProc := FParentWndProc;
inherited;
end;看来没有人讨论其他功能了