Enables or disables automatic detection of hyperlinks by a rich edit control.
Specify 0 to disable automatic link detection, or one of the following values to enable various kinds of detection.
This parameter determines the URL schemes recognized if AURL_ENABLEURL is active. If lParam is NULL, the default scheme name list is used (see Remarks). Alternatively, lParam can point to a null-terminated string consisting of up to 50 colon-terminated scheme names that supersede the default scheme name list. For example, the string could be "news:http:ftp:telnet:". The scheme name syntax is defined in the Uniform Resource Identifiers (URI): Generic Syntax document on The Internet Engineering Task Force (IETF) website. Specifically, a scheme name can contain up to 13 characters (including the colon), must start with an ASCII alphabetic, and can be followed by a mixture of ASCII alphabetics, digits, and the three punctuation characters: ".", "+", and "-". The string type can be either char* or WCHAR*; the rich edit control automatically detects the type.
If the message succeeds, the return value is zero.
If the message fails, the return value is a nonzero value. For example, the message might fail due to insufficient memory, an invalid detection option, or an invalid scheme-name string.
If lParam contains more than 50 scheme names, the message fails with a return value of E_INVALIDARG.
If automatic URL detection is enabled (that is, wParam includes AURL_ENABLEURL), the rich edit control scans any modified text to determine whether the text matches the format of a URL (or more generally in Windows 8 or later an IRI—International Resource Identifier). If lParam is NULL, the control detects URLs that begin with the following scheme names:
When automatic link detection is enabled, the rich edit control removes the CFE_LINK effect from modified text that does not have a format recognized by the control. If your application uses the CFE_LINK effect to mark other types of text, do not enable automatic link detection. The rich edit control does not check whether a detected link exists; that responsibility belongs to the client.
A rich edit control sends the EN_LINK notification when it receives various messages while the mouse pointer is over text that has the CFE_LINK effect. For more information, see Automatic RichEdit Hyperlinks and RichEdit Friendly Name Hyperlinks.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|