EditWordBreakProcEx

The EditWordBreakProcEx function is an application-defined callback function used with the EM_SETWORDBREAKPROCEX message. It determines the character index of the word break, or the character class and word break flags of the characters in the specified text. The EDITWORDBREAKPROCEX type defines a pointer to this callback function. EditWordBreakProcEx is a placeholder for the application-defined function name.

LONG EditWordBreakProcEx(
  char *pchText,  
  LONG cchText,   
  BYTE bCharSet,  
  INT code        
);
 

Parameters

pchText
Pointer to the text at the current position. If code specifies movement to the left, the text is in the elements pchText[-1] through pchText[-cchText] and pchText[0] is undefined. For all other actions, the text is in the elements pchText[0] through pchText[cchText - 1].
cchText
Number of characters in the buffer in the direction specified by code.
bCharSet
Character set of the text.
code
Wordbreak action to take. Can be one of the values described for the code parameter in the EM_FINDWORDBREAK message.

Return Values

Returns the character index of the word break, unless the code parameter is the WB_CLASSIFY or WB_ISDELIMITER value.

Remarks

An application must install the callback function by specifying the address of the callback function in an EM_SETWORDBREAKPROCEX message.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in richedit.h.
  Import Library: User-defined.

See Also

Rich Edit Controls Overview, Rich Edit Callback Functions, EM_FINDWORDBREAK, EM_SETWORDBREAKPROCEX