[This is preliminary documentation and subject to change.]
A rich edit control sends EN_LINK notification messages when it receives various messages, such as mouse click messages, while the mouse pointer is over text that has the CFE_LINK effect. For more information about the CFE_LINK effect, see the following Remarks section.
The parent window of the control receives this notification message through the WM_NOTIFY message.
EN_LINK
idEditCtrl = (int) LOWORD(wParam); // identifier of edit control
pEnlink = (ENLINK *) lParam; // pointer to ENLINK structure
If you return zero, the control proceeds with its normal handling of the message.
If you return a nonzero value, the control does not handle the message.
To receive EN_LINK notifications, specify the ENM_LINK flag in the mask sent with the EM_SETEVENTMASK message.
A rich edit control sends EN_LINK notifications when it receives the following messages while the mouse pointer is over text that has the CFE_LINK effect:
WM_LBUTTONDBLCLK
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MOUSEMOVE
WM_RBUTTONDBLCLK
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_SETCURSOR
The CFE_LINK effect typically identifies a range of text that contains a URL. Applications can handle the EN_LINK notification by changing the mouse pointer when it is over the URL, or by starting a browser to view the location identified by the URL.
Rich Edit 2.0 and later: If you send the EM_AUTOURLDETECT message to enable automatic URL detection, the rich edit control automatically sets the CFE_LINK effect for modified text that it identifies as a URL.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in richedit.h.
Rich Edit Controls Overview, Rich Edit Notification Messages, CHARRANGE, EM_AUTOURLDETECT, ENLINK, NMHDR