how to "new line" in Cstring?
-
just like \n for char[].. i want to display like "test string line1 \n test string2 line2 \n test string3 line3 \n" in CEdit. CString cs; cs="test string line1 \n"; cs +="test string line2\n"; cs +="test string line3\n"; m_Contrl.SetWindowText(cs); it didn't work :( regards, Rookie
-
just like \n for char[].. i want to display like "test string line1 \n test string2 line2 \n test string3 line3 \n" in CEdit. CString cs; cs="test string line1 \n"; cs +="test string line2\n"; cs +="test string line3\n"; m_Contrl.SetWindowText(cs); it didn't work :( regards, Rookie
-
just like \n for char[].. i want to display like "test string line1 \n test string2 line2 \n test string3 line3 \n" in CEdit. CString cs; cs="test string line1 \n"; cs +="test string line2\n"; cs +="test string line3\n"; m_Contrl.SetWindowText(cs); it didn't work :( regards, Rookie
-
-
ya.. it is set to multiline.. still its not working.. do u think "\n" will work in CString?? regards, Rookie
-
just like \n for char[].. i want to display like "test string line1 \n test string2 line2 \n test string3 line3 \n" in CEdit. CString cs; cs="test string line1 \n"; cs +="test string line2\n"; cs +="test string line3\n"; m_Contrl.SetWindowText(cs); it didn't work :( regards, Rookie
Try CString cs; cs="test string line1 \r\n"; cs +="test string line2\r\n"; cs +="test string line3\r\n"; ... AndyC
-
Try CString cs; cs="test string line1 \r\n"; cs +="test string line2\r\n"; cs +="test string line3\r\n"; ... AndyC
-
Andy \r\n is working .... :-D its workingggg...:-O thanx thanx thanx thanx... regards, Rookie
-
just like \n for char[].. i want to display like "test string line1 \n test string2 line2 \n test string3 line3 \n" in CEdit. CString cs; cs="test string line1 \n"; cs +="test string line2\n"; cs +="test string line3\n"; m_Contrl.SetWindowText(cs); it didn't work :( regards, Rookie
A carriage return is
\r
. A line feed is\n
. A CRLF pair is\r\n
. This has nothing to do withCString
.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown