Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

inserting text in multi-line CEdit boxes

Posted on 1998-07-14
2
Medium Priority
?
346 Views
Last Modified: 2013-11-20
I'm trying to insert a string into a multi-line edit box of class CEdit. The string contains carriage-return characters ('\n') and I want the edit box to seperate the string into different lines at those points.

But when the text is displayed, it just has a vertical bar (similar to | ) at the points where there should be a line break, and all the text runs together on one line.

Does anyone know what I'm doing wrong?
thanks
Anthony
ajnicholson@lucent.com
0
Comment
Question by:nicholso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 1319163
SetDlgItemText(IDC_EDIT, "This is a test\r\nLine 2");
0
 

Expert Comment

by:sks
ID: 1319164
You have to have "\r\n"

\r represents return carraige
n represents new line
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question