Solved

New Line in EditBox

Posted on 1998-09-03
2
801 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

623 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