Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

New Line in EditBox

Posted on 1998-09-03
2
Medium Priority
?
806 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 200 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

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

885 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