EN_LINK notification code
Applies to: desktop apps only
A rich edit control sends EN_LINK notification codes when it receives various messages, for example, when the user clicks the mouse or when the mouse pointer is over text that has the CFE_LINK effect. A windowless rich edit control sends this notification by using the ITextHost::TxNotify method. The parent window of the control receives this notification code through a WM_NOTIFY message.
EN_LINK
penLink = (ENLINK *) lParam;
Parameters
- wParam
-
The window ID retrieved by calling the GetWindowLong function with the GWL_ID value.
- lParam
-
Pointer to an ENLINK structure. The structure contains an NMHDR structure, information about the notification code, and a CHARRANGE structure that indicates the range of characters that have the CFE_LINK effect.
Return value
Return zero to allow the control to proceed with its normal handling of the message.
Return a nonzero value to prevent the control from handling the message.
Windows 8: Return EN_LINK_DO_DEFAULT to direct the rich edit control to perform the default action.
Remarks
To receive EN_LINK notification codes, specify the ENM_LINK flag in the mask sent with the EM_SETEVENTMASK message.
A rich edit control sends EN_LINK notification codes 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 an URL. Applications can handle the EN_LINK notification code by changing the mouse pointer when it is over the URL, or by starting a browser to view the location identified by the URL.
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.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012