Solved

how to display multi-lines in a dialog box using VC

Posted on 1998-11-19
3
183 Views
Last Modified: 2010-04-01
I'm trying to display some string in a dialog box. I use the
 CString variable and UpdateData(FALSE) to do it. But I can not get multiple lines out. They are all in one line.
0
Comment
Question by:f22
  • 2
3 Comments
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1178254
Since it looks like you're using MFC and Visual C++, do the following:

- Open the dialog for editing in the resource editor
- Right click on the troublesome edit box
- Go to properties
- Go to one of the other tabs (something like More Styles) and select "multiple lines"
- Recompile

It should work now.  If you have any further questions, please feel free to ask.
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1178255
You will need to make sure that your lines are separated by \r\n and NOT \n\r.

The edit control will only use \r\n as the line separator.
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1178256
Wouldn't that be better posted as comment?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ - Convert a wString to char * 9 516
Handling string inputs in C/Linux 23 179
Move constructor only called if marked noexcept? 6 98
Arduino EDI - Programming language 3 80
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

895 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

19 Experts available now in Live!

Get 1:1 Help Now