Solved

inserting text in multi-line CEdit boxes

Posted on 1998-07-14
2
335 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Need Help INsttalling wget on Mavericks OS X 3 84
format the code in java 6 72
sum28 challenge 31 96
pre4 challenge 19 88
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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now