An EM_AUTOURLDETECT message enables or disables automatic detection of URLs by a rich edit control. To send this message, call the SendMessage function with the following parameters. SendMessage( (HWND) hWnd, // handle to destination window EM_AUTOURLDETECT, // message to send (WPARAM) wParam, // URL detection state (LPARAM) lParam // not used; must be zero ); Parameters wParam Specify TRUE to enable automatic URL detection or FALSE to disable it. lParam This parameter is not used; it must be zero. Return Values If the message succeeds, the return value is zero. If the message fails, the return value is a nonzero value. For example, the message may fail due to insufficient memory.Res If automatic URL detection is enabled, the rich edit control scans any modified text to determine whether the text matches the format of a URL. The control detects URLs that begin with the following prefixes: http: file: mailto: ftp: https: gopher: nntp: prospero: telnet: news: wais: When it detects a URL, the control sets the CFE_LINK effect bit for all characters in the URL string. The control highlights the URL string by underlining it and setting the text color.Note When automatic URL detection is enabled, the rich edit control removes the CFE_LINK effect from modified text that does not have a URL format recognized by the control. If your application uses the CFE_LINK effect to other types of text, do not enable automatic URL detection.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. Requirements Windows NT/2000/XP: Included in Windows NT 4.0 and later. Windows 95/98/Me: Included in Windows 98 and later. Redistributable: Requires Rich Edit 2.0 or later on Windows 95. Header: Declared in Richedit.h.
cj60lib可以到以下地址下载。
http://extend.hk.hi.cn/~netsoft/code/cj60lib.zip
(HWND) hWnd, // handle to destination window
EM_AUTOURLDETECT, // message to send
(WPARAM) wParam, // URL detection state
(LPARAM) lParam // not used; must be zero
);
Parameters
wParam
Specify TRUE to enable automatic URL detection or FALSE to disable it.
lParam
This parameter is not used; it must be zero.
Return Values
If the message succeeds, the return value is zero. If the message fails, the return value is a nonzero value. For example, the message may fail due to insufficient memory.Res
If automatic URL detection is enabled, the rich edit control scans any modified text to determine whether the text matches the format of a URL. The control detects URLs that begin with the following prefixes: http:
file:
mailto:
ftp:
https:
gopher:
nntp:
prospero:
telnet:
news:
wais:
When it detects a URL, the control sets the CFE_LINK effect bit for all characters in the URL string. The control highlights the URL string by underlining it and setting the text color.Note When automatic URL detection is enabled, the rich edit control removes the CFE_LINK effect from modified text that does not have a URL format recognized by the control. If your application uses the CFE_LINK effect to other types of text, do not enable automatic URL detection.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. Requirements
Windows NT/2000/XP: Included in Windows NT 4.0 and later.
Windows 95/98/Me: Included in Windows 98 and later.
Redistributable: Requires Rich Edit 2.0 or later on Windows 95.
Header: Declared in Richedit.h.