tags:

views:

187

answers:

3

TextBoxes created by "CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", ES_MULTILINE.." require \r\n for a new line. im redirecting my stdoutput into that textbox, which uses just '\n' to indicate a new line. and im not willing to replace all '\n' with '\r\n' isn't there a way to let '\n' beeing a newline in textboxes?

thx

A: 

\r\n is not a new line. It is a carriage return + new line. They are different things. It probably means more to people who work in the console world though because you can go to a new line without shifting back to character position 1.

Joe Philllips
+2  A: 

I'm pretty sure what you're asking is impossible (i.e. there's no magic setting to make Windows edit controls accept Unix-style newlines).

codebolt
alright, thanks for letting me know.so i really have to replace all the \n with \r\n :/
5andr0
+1  A: 

Not sure what language you are using, but why not just do this (VB.NET Example):

TextBox1.Text=TextBox1.Text.Replace("\r\n","\n")

That should replace all the "\r\n" occurences with just "\n"

icemanind