mfcmultilineword-wrapcedit

Setting a CEdit control text value and it word-wrap


I have a CEdit control and I have it set as multiline in the resources.

The user can type text and if it is too wide for the control it will word wrap. Great.

Now, I know that I can pass in a string and include new line characters like \n to cause it to show text of multiple lines.

But if I have a single line of text, that is too long, it will not work wrap. :( So how do I deal with that?


Solution

  • I found the solution here.

    I had to set the ES_AUTOHSCROLL property to false.

    Now it works:

    Edit control - wordwrap