EDITWORDBREAKPROCEX callback function (richedit.h)

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.

Syntax

EDITWORDBREAKPROCEX Editwordbreakprocex;

LONG Editwordbreakprocex(
  [in] char *pchText,
  [in] LONG cchText,
  [in] BYTE bCharSet,
       INT action
)
{...}

Parameters

[in] pchText

Type: char*

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

[in] cchText

Type: LONG

Number of characters in the buffer in the direction specified by code.

[in] bCharSet

Type: BYTE

Character set of the text.

action

Return value

Type: LONG

The function returns a value based on the code parameter.

Return code Description
code parameter
Return value
WB_CLASSIFY
Returns the character class and word-break flags of the character at the specified position.
WB_ISDELIMITER
Returns TRUE if the character at the specified position is a delimiter or FALSE if the character is not.
All other values
Returns the character index of the word break.

Remarks

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

For Microsoft Rich Edit 2.0 and later, Rich Edit no longer supports EditWordBreakProcEx. Users can send EM_SETWORDBREAKPROC to set EditWordBreakProc, which is now enhanced to support the passing of Unicode text.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header richedit.h

See also

EM_FINDWORDBREAK

EM_SETWORDBREAKPROCEX

EditWordBreakProc

Reference