An application sends the EM_SETWORDBREAKPROC message to an edit control to replace the default word wrap function with an application-defined word wrap function.
EM_SETWORDBREAKPROC
wParam = 0; // not used; must be zero
lParam = (LPARAM)(EDITWORDBREAKPROC)ewbprc; // function address
This message does not return a value.
A word wrap function scans a text buffer that contains text to be sent to the screen, looking for the first word that does not fit on the current screen line. The word wrap function places this word at the beginning of the next line on the screen.
A word wrap function defines the point at which the system 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 caret to the next word or previous word. The default word wrap function breaks a line of text at a space character. The application-defined function may define the word wrap to occur at a hyphen or a character other than the space character.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Edit Controls Overview, Edit Control Messages, EditWordBreakProc, EM_FMTLINES, EM_GETWORDBREAKPROC