• Advertisement
Sign in to follow this  

Edit Control

This topic is 4247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Making a simple text editor. Does the edit control have some kind of incapability of displaying a new line character (and return carriage)? I've got it on the multiline style. What I've tried: Making a new txt document with notepad. Typing in: Cat Mouse Dog When I open it within my program it says: CatMouseDog in the EDIT control. Then lets say in my text editor I add: CatMouseDogFish And then save it. It will open up in notepad as: Cat Mouse DogFish When I open the file up in a hex editor there is nothing unexpected (0D0A where they should be)

Share this post


Link to post
Share on other sites
Advertisement
You will need to do "\r\n" to display a new-line in an edit control as far as I know, i.e., "Line1\r\nLine2".

Share this post


Link to post
Share on other sites
0D0A is like 1310 or '\r''\n' in ascii.

The file opens properly in notepad. In the hex editor all the \r\n are in the right place. But when I open the file in my text editor it does not show new lines at all.

Share this post


Link to post
Share on other sites
Okay I figured something out:

The edit box will only display the new lines if it's \r\r\n.

Unfortunately notepad will not be able to open it properly with that character sequence.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement