Handling Word Wrap

An application can use word wrap functions with multiline edit controls to locate the word or word fragment that should be wrapped to the next line. Using the default word wrap function provided by the system, lines always end at the spaces between words. An application can specify its own word wrap function by supplying a EditWordBreakProc word wrap function and sending an edit control an EM_SETWORDBREAKPROC message. An application can retrieve the address of the current word wrap function by sending the control an EM_GETWORDBREAKPROC message.

An application may direct a multiline edit control to add or remove a soft line break character (two carriage returns and a linefeed) automatically at the end of wrapped text lines. An application can turn this feature on or off by sending the edit control an EM_FMTLINES message. This message applies only to multiline edit controls and does not affect a line that ends with a hard line break (one carriage return and a linefeed entered by the user).