Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The EM_INSERTLINKS message inserts the passed string as a link in the RichInk control.
Syntax
EM_INSERTLINKS wParam = (WPARAM) (UINT) strLength; lParam = (LPARAM) (LPWCHAR) lpString; |
Parameters
- strLength
-
Number of Unicode characters in the string.
- lpString
-
Pointer to a Unicode string.
Return Value
None.
Remarks
Copy Code | |
---|---|
#define EM_INSERTLINKS (WM_USER + 333) |
The two following examples are possible strings.
"Tap <file:notes{Go to Notes}> to go to Notes\r" "Tap <file:SHFind{Find}> to find items."
The following table provides syntax explanations.
Syntax | Description |
---|---|
<file: |
Indicates the start of a link ending with >. |
Notes |
Indicates the shell execute command. If there are no backslashes depicting a path (e.g., \\mydocs\example.pwi), the first parameter is executed and the subsequent items are sent as parameters. |
{Go to Notes} |
Indicates text shown as a link. |
\r |
Indicates a new line. |
-
Use the ES_EX_CONTROLPARENT and WS_EX_STYLE flags to set up the proper font and modes. The following code sample demonstrates the use of ES_EX_CONTROLPARENT.
Copy Code CONTROL "",IDC_GLOBALOPTIONS_LINK, RICHINK_CLASS, ES_MULTILINE | WS_TABSTOP, 4,139,100,10, ES_EX_CONTROLPARENT
-
Use the SendMessagefunction to specify the text for the link as in the following code sample.
Copy Code HWND hwndGlobalNotes = GetDlgItem (hDlg, IDC_GLOBALOPTIONS_LINK); SendMessage (hwndGlobalNotes, EM_INSERTLINKS, (WPARAM)lstrlen(szTitle), (LPARAM)szTitle);
Requirements
Header | richink.h |
Library | richink.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Pocket PC 2000 and later |