Solved

New Line in EditBox

Posted on 1998-09-03
2
794 Views
Last Modified: 2013-11-20
I want to send some text to an editbox and do not know how to achieve a line break. It does not work with \n. What do I have to do ?
0
Comment
Question by:MarcoHelmers
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1321695
Use \r\n, edit control must have multiline style

Example

CString str = "Hello\r\nWorld" ;
m_edit.SetWindowText( str ) ;

Where m_edit is your CEdit control
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1321696
Sorry I just realized I should probably explain multi-line style.

It's ES_MULTILINE

set in when you CreateWindow the edit, or for dialog based edits on the Styles option on Edit Properties for the edit control in the resource editor.


0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 96
Host to IP 7 78
Tab names are off by one 5 54
sumNumber challenge 16 123
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

831 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