Solved

New Line in EditBox

Posted on 1998-09-03
2
787 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 73
lucky13 challenge 11 112
Execute multiple curl cmds with sleep and send output to file 10 80
Problem to event 3 52
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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 explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

13 Experts available now in Live!

Get 1:1 Help Now