共用方式為


EM_INSERTLINKS

Send Feedback

The EM_INSERTLINKS message inserts the passed string as a link in the RichInk control.

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 Values

None.

Remarks

#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.

To set up a Link Control in a dialog box

  1. 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.

    CONTROL "",IDC_GLOBALOPTIONS_LINK, RICHINK_CLASS, ES_MULTILINE | WS_TABSTOP, 4,139,100,10, ES_EX_CONTROLPARENT
    
  2. Use the SendMessage function to specify the text for the link as in the following code sample.

    HWND hwndGlobalNotes = GetDlgItem (hDlg, IDC_GLOBALOPTIONS_LINK);
    
    SendMessage (hwndGlobalNotes, EM_INSERTLINKS, (WPARAM)lstrlen(szTitle), 
                 (LPARAM)szTitle);
    

Requirements

Pocket PC: Pocket PC 2000 and later
Smartphone: None
OS Versions: Windows CE 3.0 and later
Header: richink.h
Library: richink.lib

See Also

RichInk Control Messages

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.