Solved

inserting text in multi-line CEdit boxes

Posted on 1998-07-14
2
338 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
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Define unique primary key 9 92
Complete beginner needs help making a cron job 9 116
Shell script to login to remote m/c and execute commands 10 78
sumHeights  challenge 17 70
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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