EM_SETWORDBREAKPROC

EM_SETWORDBREAKPROC

wParam = 0; /* not used, must be zero */

lParam = (LPARAM)(EDITWORDBREAKPROC)ewbprc; /* function address */

An application sends the EM_SETWORDBREAKPROC message to an edit control to replace the default wordwrap function with an application-defined wordwrap function.

Parameters

ewbprc

Value of lParam. Specifies the procedure-instance address of the application-defined wordwrap function. The MakeProcInstance function must be used to create the address. For more information, see the description of the WordBreakProc callback function.

Return Value

This message does not return a value.

Comments

A wordwrap function scans a text buffer (which contains text to be sent to the display), looking for the first word that does not fit on the current display line. The wordwrap function places this word at the beginning of the next line on the display.

A wordwrap function defines the point at which Windows should break a line of text for multiline edit controls, usually at a space character that separates two words. Either a multiline or a single-line edit control might call this function when the user presses arrow keys in combination with the CTRL key to move the cursor to the next word or previous word. The default wordwrap function breaks a line of text at a space character. The application-defined function may define wordwrap to occur at a hyphen or a character other than the space character.

See Also

EM_FMTLINES, EM_GETWORDBREAKPROC, MakeProcInstance, WordBreakProc