• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

MultiLine Edit Control

In Multiline Edit control ..when i set the text which contains
'\n' character using the SetWindowText function ,it's not
moved onto the next line ,but instead it displays a thick line for
the '\n' and all the characters are displayed in the same line.

How can i display the text onto the next line ..if the string
contains a '\n' character in Multiline Editcontrol.
0
kallzz
Asked:
kallzz
1 Solution
 
AlexFMCommented:
Use \r\n:

SetWindowText(_T("1\r\n2"));
0
 
kallzzAuthor Commented:
You mean to say that ..i  will have to loop through the characters in the string
and insert \r  whenever i encounter an '\n' is encountered
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now