Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 810
  • Last Modified:

New Line in EditBox

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
MarcoHelmers
Asked:
MarcoHelmers
  • 2
1 Solution
 
Answers2000Commented:
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
 
Answers2000Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now